Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment There are many ways to do this (Score 1) 677

As others have show, you can use nested conditionals, status variables, and/or other means to avoid using Goto.

Yes, conditionals, case: statements, and similar constructs are really "goto" statements under the hood, but they are generally easier for humans to read and maintain and easier for compilers to optimize than a goto statement.

Which of the options listed below should you use? In many cases that will depend on the "coding style" of the developer or development team rather than any minor differences in "technical merit."

Comment Even that is more readable if it's re-written (Score 1) 677

FART: printf("FART\n"); goto FART;

OK fine do it this way if you are using BASIC or some other language where GOTO is a common idiom.

But in most common procedural languages something akin to

while (true) do print("FART\n") ; done

or

do print("FART\n") until (false)

is easier to read, if only because you don't have to remember that lines can have labels.

Comment Not sure if you can get a valid sample here (Score 2) 289

If as you suggest the quality of therapists is all over the map, getting a "statistically significant representative sample" may require many more data points than you could get by asking /.

Not to mention that people who reply here will be self-selected and unlikely to be "representative" even if you were able to get enough data points.

Unfortunately, there are many things in this world that you have to decide whether to "buy in" to them or not long before you know if it's likely to be "worth the money" or not.

Comment Butt, butt... Re:But... (Score 1) 101

Those secret prisoners that we have are likely located in places where the media and general population aren't talking about.

Ah, you must mean the basement restrooms of MSNBC and Fox News. I never hear anyone talking about those places on the air or at the water-cooler, and it makes you wonder what is really happening down there.

Comment Limited market (Score 1) 330

There is a very limited market for "dumb" TVs that "smart" TVs don't fill just as well.

That is, almost everyone who thinks they want a "dumb" TV will choose a "smart" one if the price of the "dumb" one is even $1 more than the "smart" one.

There are some markets where a "smart" TV is just not an option. Any location where policy prohibits any device that's even capable of being connected to a network, such as prisons, come to mind. Another place is where the "smart" devices are perceived as being more likely to be abused/vandalized/stolen than a "dumb" one, such as hotel rooms in high-theft-risk locations. However, most of these users would be perfectly happy with a tuner-less monitor rather than a television, thereby making the question about "dumb TELEVISIONS" irrelevant to them.

Comment Re:It could've been worse ... oh wait.... (Score 1) 136

I mean EVEN Debian still makes security packages for Potato and Woody! ... right?

I don't know if Debian does or not (I'm going to assume not based on your tone), but at least Debian's customers have everything they need (except maybe skill and time) to fix it themselves.

Microsoft customers? Not so much.

Comment It could've been worse ... oh wait.... (Score 0) 136

"Microsoft Does Not Fix Critical Remotely Exploitable Windows Root-Level Design Bug"

To all Windows Server 2003 users still out there: Oh wait...

Or even worse:

For the last several years there's been a critical no-workaround vulnerability that even the vendor didn't know about. Oh wait...

Comment Rent vs. Buy is always a case-by-case decision (Score 1) 480

buying a home. Hasn't made sense since the 1970s

Just looking at dollars and cents, there's no way you can make a blanket statement like that. Every city's housing and rental market is unique and the market today isn't the same as it will be a year from now. The same city that is "better to rent in" today could easily become "better to buy in next year" or vice-versa, while the city a few states over could easily be the other way around both now and a year from now.

There's also the issue of how much house you need. I know of one city that in the mid-2000s at least was better for buyers if you wanted a 3-bedroom suburban home but better for renters if you needed a 1-bedroom accommodation. At least it was after you added in the "volatility-risk cost" of buying a condo (the condo market was much more volatile than the single-family-home market in that city, meaning you could easily either take a bath or walk away with an unexpected bonus if you were forced to sell, say, due to a job transfer).

And this is not even considering the intangibles like "how much do I value not having to go through the hassle of selling when I want to move" and "how much value to I have in not being at the mercy of a landlord who can jack up rents with each lease renewal and/or sell the property to someone who wants to not renew my lease and move in himself."

Comment Lottery math - you almost always lose (Score 1) 480

The real time to buy a lottery ticket is when the expected payout - the payout times the odds that at least one person will draw the winning number - is more than the expected gross revenue since the last drawing.

Here's a simple example:
pick 4 numbers from 1 to 100. The odds of winning are 1 in 100,000,000.
If 100,000,000,000 million people play every week, then in the first week the odds that SOMEONE will win are close to but not quite 100%, so the expected pay-out is a bit less than $100,000,000. Smart money says don't play.

To keep things simple let's assume that the next week only 100,000,000 new people play. The odds that SOMEONE will win are close to but not quite 100%. They are certainly over 50%. The expected payout will be a bit less than $200,000,000 and certainly more than the $100,000,000 that bettors put on the table this time around. The smart money says play.

If you don't see how this works, assume YOU are the only bettor in week two and you buy all 100,000,000 tickets using a random-number-generator. There will be duplicate bets (if you weren't the only ticket-buyer, these numbers would result in you having to share the prize), but you will cover well over 50,000,000 of the possible combinations. If you win, you more than double your investment, and the odds of you winning are more than 50/50.

Of course in the real world it's almost never going to become a good investment to buy a lottery ticket if all you care about is financial return. Why? Because as the jackpot goes up, people who normally don't buy tickets do so. Why? Some do it for emotional/fantasizing reasons. Some do it so they can tell their grandchildren how they "almost won the big one." Some may do it because they think the number of new tickets sold will be low enough to make it a "smart decision" to buy a ticket.

Bottom line: There may be good reasons to buy a lottery ticket, but "because it's a good investment/because it's a smart gamble" is almost never one of them.

Submission + - How to make your carrier unlock your smartphone

catparty writes: After an FCC ruling, all carriers must comply with requests to unlock a phone on their network and that rule goes into effect starting today. Compiled here are the guidelines of the ruling, what makes you eligible, and how to get in touch with each carrier to go make them unlock your phone in the U.S.

Submission + - Russia seeking to ban Tor, VPNs and other anonymising tools (thestack.com) 1

An anonymous reader writes: Three separate Russian authorities have spoken out in favour of banning online anonymising tools since February 5th, with particular emphasis on Tor, which — despite its popularity with whistle-blowers such as Edward Snowden and with online activists — Russia's Safe Internet League describes as an 'Anonymous network used primarily to commit crimes'. The three authorities involved are the Committee on Information Policy, Information Technologies and Communications, powerful Russian media watchdog Roskomnadzor and the Safe Internet League, comprising the country's top three network providers, including state telecoms provider Rostelecom. Roskomnadzor's press secretary Vadim Roskomnadzora Ampelonsky describes the obstacles to identifying and blocking Tor and VPN traffic as 'difficult, but solvable'.

Submission + - Are there quality but affordable large HD/UHD/4K "stupid" screens? 1

LOGINS SUC writes: Truly in the first-world problems category, I've been looking for large format (>55") HD/UHD screens for home entertainment. In light of the recent Samsung big-brother monitoring and advertisement injection concerns, does any reputable manufacturer still make "stupid" TVs? I don't want to pay for all the WiFi, apps, cameras, or microphones. I don't need it to have speakers. And at this point, I don't even care if it has the TV receiver functionality. All this stuff leads to vendor lock-in or is well on the path to obsolescence by the time I purchase the device. I prefer all of this non-visual functionality be handled by devices better suited to the purpose and I don't want to pay for screens including these widgets I have no intention of ever using, at all.

I've searched all the normal retail outlets. If I find anything, they are wildly expensive. "Computer monitors" fit the bill but are almost all 55") LCDs in the sub-$3,000 range anymore? Are projectors the last bastion of visual purity for home entertainment?

Submission + - Firefox to mandate extension signing (mozilla.org)

x0ra writes: In a recent blog post, Mozilla announced its intention to require extension to be signed in Firefox, without any possible user override. Only Nightly, Developer Edition, and unbranded build will be able to run unsigned add-on.

With this move, Mozilla is joining Apple and Google in the realm of walled-garden ecosystem.

Slashdot Top Deals

Nothing happens.

Working...