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 #100335: TextCalc

by Chris
First of all, after consulting with Alex I made this a text-mode application styled after terrible VB/DOS programs of the early 90s. It's still mouse-driven, and even draws a software cursor...regardless of the existence of Windows's cursor.

It leaks memory like a firehose, there are some extremely dubious pointer tricks in there (one put in after reading Raymond's blog entry on new/delete mismatch and getting inspired), and my division algorithm is O(n^4) when it doesn't just give up and pick a predefined result.

Other fun things: -999 is the same as Err, the UI is godawful, and += destroys both sides of the expression. Many of the comments are highly inaccurate, and all uses of const are terrible, terrible lies.

Download0 Comments