Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).


Comment: Re:About that link (Score 1) 358

by Weasel Boy (#33618346) Attached to: IE9, FF4 Beta In Real-World Use Face-Off

But why should upper-middle class pay a greater percentage of their earnings toward roads than the lower-middle class?

Marginal income. A lower-middle-class family might have to spend, say, 85% of their post-tax income on basic necessities, whereas an upper-middle-class family might be able to meet those same needs on 60% of their income. Wealthier people have more cash left over after their basic needs are met. That's why we have progressive marginal tax rates.

Do rich people wear out roads faster?

Yes, they do. They take public transit less, and they drive more and bigger cars.

Do the cops spend more or less of their budget year dealing with rich or poor people?

Rich people have a greater expectation of service from the cops than poor people do.

Obama, et al, really do think your money belongs to them first. To be doled out as they see fit.

The only difference between Obama and Bush is that Obama thinks the rich should pay taxes.

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

by Weasel Boy (#28654185) Attached to: Getting a Classic PC Working After 25 Years?

"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

by Weasel Boy (#28317929) Attached to: Should Undergraduates Be Taught Fortran?

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

by Weasel Boy (#28317907) Attached to: Should Undergraduates Be Taught Fortran?

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

by Weasel Boy (#28301991) Attached to: Should Undergraduates Be Taught Fortran?

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 ...



I would say:

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



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

Posted by Soulskill
from the not-rogue-origins dept.
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."

Nobody's gonna believe that computers are intelligent until they start coming in late and lying about it.