5

So at one point I worked on an inherited project that had the worst code I've ever seen. I mean bad, so bad there may no quantifiable measure that can accurately convey how bad. We ended up naming the thing 'the hydra', cause it had a million issues and they just kept growing as we fixed things. To my point, in C++ they implemented their own primitive type Boolean32 as a signed int32 pointer. If that wasn't enough they used it as an octal bit mask. They also switch the value using logical and / or between 2 numbers, 037777777777 and 000000000001. So essentially they only switch this value to 1 or -1 and end up comparing it to their own const true or false. In c++ any value not 0 is == true...apparently not in this code.

Comments
Add Comment