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

 



Forgot your password?
typodupeerror
×

Comment Re:What are you guys talking about? (Score 1) 533

"Cut your teeth" is a term from the pre-industrial era, when only master craftsmen could design and build mechanical equipment. The masters worked with entire gear trains, apprentices were put to work polishing the metal plates from which gears were made, and journeymen made the gears. In order to graduate from apprentice to journeyman, you had to design and fabricate your own tooth-cutting bit and make a gear. If it meshed with the gears the established journeymen were making, you qualified.

Comment Re:Maybe not ALL tenets... (Score 1) 794

Excellent response. Using break statements would have the same effect that my GOTO statements have, with non-GOTO syntax.

Using multiple return points in my experience is more trouble than not. It is just another magic "get me the fuck out of here", plus you have to duplicate your cleanup code.

When I'm chasing a bug, tracing the a program is easier when I know a function only exits in one place.

Comment Re:Maybe not ALL tenets... (Score 1) 794

Boolean combinations doesn't really address my need. Most of my functions follow a pattern something like this:

Set the return code to fail.

Check the parameters. If there's anything wrong, just bail and return.

Perform step 1. If it fails, don't bother going any further, just bail, perform necessary cleanup, and return.

If step 1 doesn't fail, then use the results of step 1 to perform step 2. And so on through step N.

Set the return code to success.

Clean up and return.

Without the use of GOTO, the indentation level gets deep in a hurry. With GOTO, you know that at any given point in a function, all the dependencies are successfully met in order to get that far.

You may call it bad coding style; when I was a TA for freshman programming, I know I would have. But in practice, I find it to be a very elegant solution that dramatically improves code readability and debuggability in some cases.

Comment Maybe not ALL tenets... (Score 1) 794

I use GOTO quite often. It is useful for keeping code from getting deeply nested, which in fact can impair code clarity.

Where you might say:

if( OK ) {
... function body ...

}

return;

I would say:

if( NOT_OK ) goto DONE;
... function body ...

DONE:

return;

Now imagine the above example, with 8 or 10 different places where the value has to be tested before proceeding. Without GOTO, your code is indented at various depths across the screen. With it, your code lines up neatly and is easy to scan.

Role Playing (Games)

A History of Rogue 240

blacklily8 writes "Gamasutra has published "The History of Rogue: Have @ You, You Deadly Zs." Despite only the most 'primitive' audiovisuals, Rogue has continued to excite gamers and programmers worldwide, and has been ported, enhanced, and forked now for over two decades. What is it about Wichman and Toy's old UNIX RPG that has sent so many gamers to their deaths in the Dungeons of Doom, desperately seeking the fabled Amulet of Yendor? This article covers the history of the game, including the Epyx failure to make a ton of cash selling it in 1983. It also goes into rogue-like culture and development."

Comment Not how I remember it (Score 4, Interesting) 109

The schools I attended from the late 80s through mid 90s had 5 to 10 Macs for every PC. In spite of this, there was usually a wait for Macs but never for PCs.

After we graduated, we found that the business world was 99% PCs, as it had been from day one, never having given Apple any serious consideration at all.

Most then went on to get the same kind of computer at home that they used at work because, as much of a pain as it is to use Windows, it's more of a pain to have to use both.

Then school boards started making noises, with some merit, that kids should learn in school what they'll be using in the real world. This caused many schools to switch to PCs.

This has nothing to do with technical merit and everything to do with first-mover advantage in the right market (personal computers for business).

Also, running virtual desktops over the network is not necessarily slow and clunky. Have you tried it? I've been doing it for years.

Comment Re:Biased... (Score 1) 276

Suppose you choose to release the source code of your product.

The BSD license allows your competitors to take your work and add to it in secret ways to gain a competitive advantage over you.

The GPL guarantees that if they use the fruit of your labor, you also get theirs. Maintains a level playing field for anyone who wants to open their source.

The GPL is the license for anyone who wants to share without being handicapped. The BSD license is best for for parasites.

Slashdot Top Deals

"Experience has proved that some people indeed know everything." -- Russell Baker

Working...