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.



Entry #100250: Infinite Arithmetic Implementations* (*possible; 12 provided)

by Jonathan Pryor
The WTF is that it's well designed and isn't a WTF. :-)

Declares an abstract base class for calculator operations and provides 12 different implementations (some less working than others).

Calculator operation implementation can be specified via program parameter at program startup, and a set of unit tests exists (from the OMGWTF Test Cases page) to test all of the included implementations. Calculator implementations can also be hosted in a shared library so that additional implementations can be easily used in the future.

Download0 Comments