About The Contest

The first ever Olympiad of Misguided Geeks contest at Worse Than Failure (or OMGWTF for short) is a new kind of programming contest. Readers are invited to be creative with devising a calculator with the craziest code they can write. One lucky and potentially insane winner will get either a brand new MacBook Pro or comparable Sony VAIO laptop.

Navigation

Advertisements

Entry #100295: Caching Google-Leveraging Calculator

by Rod McFarland
The calculator saves processing time by a) caching the results of expensive arithmetic operations in a linked list, and b) leveraging Google (if available) to perform the actual calculation. For caching simplicity all operations are converted to additions, via logarithms if necessary. The use of the false-if-not-zero operator (!!!) is featured in the DoDiv function.

As a nod to Douglas Adams, "A Suffusion of Yellow" is sent to stdout if the calculated result is greater than 4.

It is worth noting that the submitter has not touched C++ in nine years and has plagiarized heavily from online examples.

Also, since the original submission it turns out that it only works as intended on the machine I wrote it on. Fortunately there is a workaround: disconnect from the Internet before using the calculator.

Download0 Comments