Re: Try/Catch
- Posted by petelomax Jan 07, 2015
- 5836 views
Just thought of a slightly outside-the-box example: SETI
You collect truly vast amounts of data, inevitably some of it garbage/static.
You have two algorithms:
A: a truly beautiful, well written and robust bit of code with full error checking
B: a dirty and bug ridden horror that does the job >99% of the time and fails catastrophically on the rest, but is maybe 10x faster
The best solution is clearly to throw everything at B, and the things it crashes on at A.
Of course you could even deliberately hack an A to obtain the desired properties of B on purpose.