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

 



Forgot your password?
typodupeerror

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:GOTO is a crutch for bad programmers (Score 4, Informative) 677

by adonoman (#49039687) Attached to: Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"
What would you propose as a better alternative to this idiom in a language that lacks exceptions:

void func() {
if (!AquireResource1()) goto end;
if (!AquireResource2()) goto cleanup1;
if (!AquireResource3()) goto cleanup2:

DoStuffWithResources();

Cleanup3();
cleanup2:
Cleanup2();
cleanup1:
Cleanup1();
end:
return;
}

Comment: Re:Well that's a start... (Score 1) 163

by adonoman (#48420385) Attached to: Number of Coders In Congress To Triple (From One To Three)
I'd love to see an expert system that could take in some form of legal jargon, the details of a specific situation, and spit out an unambiguous application. Of course, then it could lead to all sorts of "hacking" the system. Imagine winning a court case because of an off-by-one error in a law, or a buffer overrun vulnerability in a contract that allowed for arbitrary code execution.

Comment: Re:Exact mathematical value isn't the ideal (Score 2) 239

by adonoman (#48115557) Attached to: Where Intel Processors Fail At Math (Again)
If you are doing any floating point calculations and assuming exact results, you're going to get yourself in trouble. The issue is that FSIN is less accurate than advertised, not that it's not 100% accurate.

Anyone who deals with floating point math very quickly learns about error accumulation and how to deal with it.

Comment: Re:Costs (Score 4, Funny) 315

by adonoman (#48095281) Attached to: Fusion Reactor Concept Could Be Cheaper Than Coal
We'd obviously have to situate it off-world and use some sort of electromagnetic beam to send the generated energy to earth. Heck, given the amount of extra power generated, we could just send off the energy everywhere and there'd still be enough hitting the earth. We could then use devices here to convert that energy into electricity.

Yes, we will be going to OSI, Mars, and Pluto, but not necessarily in that order. -- Jeffrey Honig

Working...