Thursday, October 10, 2002

How many hidden bugs?
So, how long does it take to find all the bugs in your code? We have code that was probably written in '97, been in production since '97 or '98, and we just now found a bug... and that wasn't because it didn't work. We were in fixing some stuff... cause in C++ the fact that something compiles, and even works, doesn't gurantee it will work forever. Oh yeah, you aren't supposed to do that. It can work, but it isn't guranteed to work. Sigh Anyway, I'm in code reviewing the fix, and I look at another method (yeah, I like that term instead of function - sue me) and I think... How does this work. It isn't even doing close to what it says, and upon further examination I figure out that it just happens to work. The fact that whole blocks of code are ignored works out because there is only one caller, and they just happen to set up things right so that it works out ok. And it's only been that way for 6 or 7 years.
Just makes you wonder how many bugs are out there just waiting to raise their nasty heads!

No comments: