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 #100050: aoneillomgwtf
by Andy O'Neill
Aside from some poorly written code, this calculator determines the solution by loading http://omg.worsethanfailure.com/Entries/Requirements/TestCases.aspx and searching for the solution on the page. It reloads the page every time the equal key is pressed and does a simple string search for the first occurrence of the entered calculation, grabbing the solution that is a fixed number of characters after this location.