Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:One word.. (Score 4, Interesting) 683

decent languages support labeled for/while cycles and apropriate "break label" constructs.

You often cannot develop software with the language you want, but must develop it with the language you have. C has no such features and, therefore, goto is used more often than in languages that have them. Fit the strategy to the tool.

if you do this kind of thing, you are MUCH better off separating lookup code to method or function

This is reasonable, but it assumes some other function can do the needed cleanup code or other data massaging just as cleanly. If the goto is being used because finding the value is an error condition, you often have to do certain things as soon as possible in the code so you do not lose important debugging information.

And, no, exceptions are not part of C, and setjmp/longjmp is, if anything, even less likely to pass code review. An advantage of goto is that you can keep the cleanup code in the same function, visually close to the rest of the logic and sharing the same locals.

Comment Re:One word.. (Score 5, Insightful) 683

I’m a goto-user, but this is a bad reason to use them: If you regard language features as ‘just’ syntactic sugar, why aren’t you programming in raw machine code? That is what everything eventually gets turned into anyway.

You use gotos when the normal control structures are inadequate somehow. It doesn’t matter what the compiler does; source code is for humans.

Comment Re:This guy can't see the forest for the trees (Score 2, Insightful) 708

The Internet is all about price. As you point out, quality is meaningless. If it isn't free, it is going to garner only a fraction of the interest.

I disagree. I think both iTunes and the experiences of Radiohead and Trent Reznor disprove this statement.

I think this article sums it up reasonably well: "The Great Apathetic Revolution". In summary, people will do whatever is easiest as long as it isn't absolutely insanely expensive. iTunes makes it easy to pay $0.99/track, so people do that. It's easier than finding what they want on the torrent sites. It's also easier than finding and buying the album that has the song they want, which is why Sony gets so jihaddy at them.

Today we have "clever hackers" getting their content for free and "noobs" paying the fare for everyone.

This is true. It isn't fair, but it's less unfair than it used to be: It's easier for a poor person to become clever than to become rich. The Digital Divide is self-imposed to a larger degree than previous divides have been.

Comment Re:No Tales from the Encrypt (Score 2, Funny) 126

The obvious solution is to block or severely slow down all encrypted traffic (that is, all traffic the ISP can’t interpret). This would have the obvious effect on online banking, which could be solved by the ISP’s computers handling it: The SSL tunnel stops at your ISP, which inspects the decrypted packets before handing them to you. You know the ISP isn’t going to do anything bad with the information because they told you so (in specific, there’s both a contract and fraud laws stopping them). This might hinder the adoption of new streaming video codecs and the like, but it’s a small price to pay for increased profits.

The Internet

Submission + - Pirate Bay abandons bid for own nation

tomp76 writes: Perhaps it was all just a joke. Or perhaps The Pirate Bay, despite being one of the largest bit torrent trackers in the world, isn't really as powerful as its supporters would like to believe. That, at least, is the impression given by one of the founders in this interview. The plans for a copyright-free nation have been scaled down considerably: "We have $20,000 and we are looking at some alternatives. Really we just want somewhere we can name The Pirate Bay, so we can look on Google Maps and find ourselves there."
The Courts

Submission + - Supreme Court Refuses 200 Year Porn Sentence

Class Act Dynamo writes: "The United States Supreme Court today refused to hear the appeal of a high school teacher who was sentenced to over 200 years in prison for possessing thousands of child pornography images in Arizona. The justices declined without comment to hear the case. His attorneys argued that the sentence (10 years per image for the 20 images presumably leading to indictment) was disproportionate to the crime. I put this under Your Rights Online even though those rights really don't include possessing child pornography. However, what do Slashdotters think? Was the punishment appropriate for the crime? Think of the children!..but not in the way that this teacher apparently was."
Security

Submission + - Citibank: training users to be less secure

Llamedos writes: Citibank has redesigned their credit card website (Citicards.com) so that the login page is not an SSL encrypted page. Instead, they expect users to simply accept a little lock GIF file they put up themselves, and their assurance that the form is submitted via SSL. According to Citibank, "Your security is important to us. While the new Citicards.com has an "http" address and no lock icon displays in your browser, your personal information is still protected." Citibank's security page While other sites are moving to more security and more ways for the user to protect himself (e.g., Bank of America's SiteKey program), Citibank is tearing away at protections and trying to train users not to care about security.
Media

Submission + - Documentary on DRM, Piracy, Released for Free

iSeal writes: The "On Piracy" documentary team have just released version 1.0 of their documentary, free for the download. In it, they interview figureheads of various agencies including the president of CRIA (Canadian RIAA), the Canadian Motion Picture Distributors Association (Canadian MPAA), as well as the head of Creative Commons Canada, Michael Geist, youths off the street, indy labels, band members, etc. Streaming downloads are up, and the DVD ISO is being legitimately distributed via bittorrent.
Privacy

Submission + - Who's number is on my caller ID? Who Called Us

An anonymous reader writes: I got a few calls today from a number I didn't recognize. They didn't leave a voice mail so I assumed it was a telemarketer. I decided to see what Google thought about the number and the first link that came up was: http://whocalled.us/lookup/3123279690. This link includes the phone number I was searching for. Pretty cool way for us to work together to ID the telemarketers.
Bug

IE and Firefox Share a Vulnerability 207

hcmtnbiker writes with news of a logic flaw shared by IE 7 and Firefox 2.0. IE 5.01, IE 6, and Firefox 1.5.0.9 are also affected. The flaw was discovered by Michal Zalewski, and is easily demonstrated on IE7 and Firefox. The vulnerability is not platform-specific, but these demonstrations are — they work only on Windows systems. (Microsoft says that IE7 on Vista is not vulnerable.) From the vulnerability description: "In all modern browsers, form fields (used to upload user-specified files to a remote server) enjoy some added protection meant to prevent scripts from arbitrarily choosing local files to be sent, and automatically submitting the form without user knowledge. For example, '.value' parameter cannot be set or changed, and any changes to .type reset the contents of the field... [in this attack] the keyboard input in unrelated locations can be selectively geared toward input fields by the attacker."

Slashdot Top Deals

I've noticed several design suggestions in your code.

Working...