1 post tagged “c”
I entered the OMGWTF programming contest at just about the last minute, with a rather horrible entry. The contest involved writing a simple four-function calculator in the most convoluted WTF!?!? way imaginable. I tried doing it by representing numbers as a tree, with nodes having branches to up to two other nodes — with no other properties. All the operations would have worked by following paths through the trees and creating new trees. The nodes would have been maintained in a heap, and managed with a garbage collection scheme.
I failed miserably. Indeed, I probably shouldn't have even bothered submitting it. All I really got to work was addition, for some numbers. A lot of it was poor judgment on my part—working on things like adding decimal numbers, which could have waited for later. But anyway, you can check out the code as I submitted it: CalcFunc.cpp. Unfortunately, I didn't have the time to write any comments. But I'll try to get it working anyway, and explain everything then.
If only I used SourceGear Fortress with its work item tracking, build tracking, and nifty Visual Studio 2005 integration—a totally seamless ALM experience—then I'd have been guaranteed success! I'll know better for next time. (Thanks to Eric Sink and SourceGear for the awesome shirt!)