Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Well, yeah (Score 1) 677

Stop teaching students to avoid goto so that it takes hold again, leading to bad code all over the place, so that we can empirically prove that it's a bad idea? How about we just don't do that and avoid the problem to begin with.

Unrestrained use of goto was demonstrated to be a bad idea decades ago, that's why Dijkstra recommended against it in 1968.

Comment Re:Well, yeah (Score 1) 677

The point is that people do not generally use goto in these harmful ways because they've been warned not to. That's what skews the study in the summary. You're going to have a hard time finding that empirical evidence of how goto can lead to bad code, because one of the first things coders are taught in today's programming courses is, "Do not use goto." Meaning that the inexperienced coders who would be having these problems are avoiding the problem by not using goto. Those who are using goto are those who know the risks and how to mitigate them.

So, in the absence of conclusive data either way, I can only argue from my experience. I'm a programmer who has used both goto and more tightly-controlled flow control, and in my experience goto is not a good option for the vast majority of cases (particularly for inexperienced coders).

Comment Re:all languages can be abused (Score 1) 677

Not sure what you're getting at with compilers. Once you translate a C program to assembler/machine code, most of your loops, switches, breaks, etc. all become effectively the same as goto. The problem with goto has nothing to do with the compiler, it has to do with the human being trying to read, write, and debug the code before it goes through the compiler, and with catching errors at compile-time with sane control flow, whereas with goto it will make it through the compiler and become a runtime error.

You complain about the giant if/for nests, but those huge nests will almost always become worse if you start throwing gotos in there.

Yes, goto is a tool like anything else. But it is not a tool for the common case or the common coder. Most of the time, if you're asking yourself, "should I use goto here or something else?" the answer is the something else.

Comment Re:Well, yeah (Score 1) 677

If you think modern code is horrible spaghetti (I disagree, for the record), bear in mind that it would be considerably worse with indiscriminate use of goto.

Sure, code has complex code flow. When code is designed to solve complex problems, it's going to be complex. Complexity is okay. The key is being able to make complex code clear, readable, and less error-prone. Goto is less clear and readable because it's not obvious what a goto statement is meant to do. When you see a while loop, or a break statement, or a function call, you can get an idea of what it's doing just by the nature of what statement is being used. Goto can be used to cover any of those cases, so it's more difficult to follow. Because of this, it's also easier to make a difficult-to-debug mistake!

99% of the time, when you could use a goto statement in code, there is another, better way of doing the same thing. An expert coder will be able to effectively use it in a way that limits the risk, but for a novice or intermediate coder, or even many experienced ones, it is much easier to muck everything up using goto vs. using other control flow tools.

Submission + - $10K Ethernet Cable Claims Audio Fidelity, If You're Stupid Enough To Buy It (hothardware.com)

MojoKid writes: There are few markets that are quite as loaded-up with "snake oil" products as the audio/video arena. You may have immediately thought of "Monster" cables as one of the most infamous offenders. But believe it or not, there are some vendors that push the envelope so far that Monster's $100 HDMI cables sound like a bargain by comparison. Take AudioQuest's high-end Ethernet cable, for example. Called "Diamond," AudioQuest is promising the world with this $10,500 Ethernet cable. If you, for some reason, believe that an Ethernet cable is completely irrelevant for audio, guess again. According to their claim: "AudioQuest's Diamond RJ/E is a directional Ethernet cable made with the same hallmark materials, philosophy, care and attention that is applied to all their interconnects, whether it's an entry level introduction to Hi-Fi or a died-in-the-wool music connoisseur. Another upgrade with Diamond is a complete plug redesign, opting for an ultra-performance RJ45 connector made from silver with tabs that are virtually unbreakable. The plug comes with added strain relief and firmly lock into place ensuring no critical data is lost." It's too bad AudioQuest limits itself to just audio, because descriptions like that would prove a welcome sight in other markets. Just imagine how tempting it would be to own 100% solid paper clips made with uncompromising materials that take a no-nonsense approach to holding paper together. Unfortunately, in this case, there's the issue of digital data being, well, digital. But hey, a 1 or a 0 could arrive at its destination so much cleaner, right?

Submission + - Nvidia Cracked (wccftech.com) 4

jones_supa writes: Another day, another corporate network intrusion. Nvidia has reportedly been breached in the first week of December with the attack compromising personal information of the employees. There is no indication that other data has been compromised. This is according to an email sent out by the company's privacy office and Nvidia's SVP and CIO Bob Worwall on December 17th. It took Nvidia a couple of weeks to pick up all the pieces and assess the incident. It appears that the issue was pinned down to an employee or several employees getting their personal data compromised outside of the company network. After that, the information was used to gain unauthorized access to the internal corporate network. Nvidia's IT team has taken extensive measures since then to enhance the security of the network against similar attacks in the future.

Submission + - Microsoft is building a new browser as part of its Windows 10 push (zdnet.com)

mpicpp writes: There's been talk for a while that Microsoft was going to make some big changes to Internet Explorer in the Windows 10 time frame, making IE "Spartan" look and feel more like Chrome and Firefox.

It turns out that what's actually happening is Microsoft is building a new browser, codenamed Spartan, which is not IE 12 — at least according to a couple of sources of mine.
Thomas Nigro, a Microsoft Student Partner lead and developer of the modern version of VLC, mentioned on Twitter earlier this month that he heard Microsoft was building a brand-new browser. Nigro said he heard talk of this during a December episode of the LiveTile podcast.

Spartan is still going to use Microsoft's Chakra JavaScript engine and Microsoft's Trident rendering engine (not WebKit), sources say. As Neowin's Brad Sams reported back in September, the coming browser will look and feel more like Chrome and Firefox and will support extensions. Sams also reported on December 29 that Microsoft has two different versions of Trident in the works, which also seemingly supports the claim that the company has two different Trident-based browsers.

However, if my sources are right, Spartan is not IE 12. Instead, Spartan is a new, light-weight browser Microsoft is building.

Windows 10 (at least the desktop version) will ship with both Spartan and IE 11, my sources say. IE 11 will be there for backward-compatibility's sake. Spartan will be available for both desktop and mobile (phone/tablet) versions of Windows 10, sources say.

Submission + - Access to Gmail Is Blocked in China After Months of Disruption (nytimes.com)

mpicpp writes: The Chinese government appears to have blocked the ability of people in China to gain access to Google’s email service through third-party email clients, which many Chinese and foreigners had been relying on to use their Gmail accounts after an earlier blocking effort by officials, according to Internet analysts and users in China.

The blocking began last Friday and has ignited anger and frustration among many Internet users in China. Data from Google shows traffic to Gmail dropping to zero from Chinese servers.

The new step in blocking Gmail has consequences that go well beyond making it difficult for users to access personal emails. Some foreign companies use Gmail as their corporate email service, for example. Now, the companies will have to ensure that their employees have software known as VPNs, or virtual private networks, to access Gmail.

That software allows users to bypass the Chinese Internet censorship controls commonly known as the Great Firewall, but the authorities also attempt to inhibit the software.

People in China began noticing the new blocking method over the weekend, as their phones, tablets and computers failed to download emails from Gmail accounts if the users did not have VPN software switched on. Until now, the devices had been able to download Gmail to clients like Apple Mail or Microsoft’s Outlook. Those clients use the protocols IMAP, POP3 and SMTP to download the emails.

For months, that has been the most common way for people in China to keep using Gmail. The Chinese government had blocked access to the Gmail website and other Google websites around the 25th anniversary of the June 4, 1989, protests and fatal government response in Tiananmen Square.

Google has for years been a target of the Chinese government, and some official publications have cited the company as one component of a Western conspiracy to undermine China. For example, Chinese officials had insisted Google censor its search results, a request that angered some top executives at Google, and they refused to comply. Chinese companies like Baidu, which has a popular search engine here, benefit from the official crackdown on Google.

Submission + - Paquete Semanal (Weekly Packet) (theguardian.com)

FarnsworthG writes: Every morning, Teresita Rodriguez ferries external hard drives back and forth across Havana, using her feet to carry out the role that cables and wi-fi perform in other countries with less-restricted access to the world wide web.
Her job is both high-tech and extraordinarily simple. At one end, she sits and waits for a couple hours in the front room of the home of an information peddler, while he copies the latest terabyte-sized package of global films, TV dramas, comedies, magazines, applications and anti-virus software to her hard drive via a USB cable. She then takes those digital files to the home of her employer so he can download it and sell it on to his customers, many of whom will in turn charge their friends and neighbours for a copy.

Submission + - Three-hundred-million-year-old fossil fish still has traces of eye tissue (sciencemag.org)

sciencehabit writes: Researchers have unearthed a fossil fish so well preserved, it still has traces of eye tissues. What’s more, these fossil tissues reveal that the 300-million-year-old fish called Acanthodes bridgei, like its living relatives, possessed two types of photoreceptors called rods and cones—cells that make vision possible. This is the first time that mineralized rods and cones have been found conserved in a vertebrate fossil. The discovery of cones, which help the eye see colors, is suggestive of the presence of color vision in fish for at least 300 million years.

Submission + - The Death of Voice Mail 1

HughPickens.com writes: Duane D. Stanford writes at Bloomberg that Coca-Cola's Atlanta Headquarters is the latest big campany to ditch its old-style voice mail, which requires users to push buttons to scroll through messages and listen to them one at a time. The change went into effect this month, and a standard outgoing message now throws up an electronic stiff arm, telling callers to try later or use “an alternative method” to contact the person. Techies have predicted the death of voice mail for years as smartphones co-opt much of the office work once performed by telephones and desktop computers. Younger employees who came of age texting while largely ignoring voice mail are bringing that habit into the workforce. “People north of 40 are schizophrenic about voice mail,” says Michael Schrage. “People under 35 scarcely ever use it.” Companies are increasingly combining telephone, e-mail, text and video systems into unified Internet-based systems that eliminate overlap. “Many people in many corporations simply don’t have the time or desire to spend 25 minutes plowing through a stack of 15 to 25 voice mails at the end or beginning of the day,” says Schrage, In 2012, Vonage reported its year-over-year voicemail volumes dropped 8%. More revealing, the number of people bothering to retrieve those messages plummeted 14%. More and more personal and corporate voicemail boxes now warn callers that their messages are rarely retrieved and that they’re better off sending emails or texts. "The truly productive have effectively abandoned voicemail, preferring to visually track who’s called them on their mobiles," concludes Schrage. "A communications medium that was once essential has become as clunky and irrelevant as Microsoft DOS and carbon paper."

Slashdot Top Deals

This file will self-destruct in five minutes.

Working...