r/ProgrammerHumor • • Sep 25 '26

Meme iHatedItUntilITriedIt

Post image
10k Upvotes

540 comments sorted by

View all comments

Show parent comment

7

u/anomalous_cowherd Sep 25 '26

I once spent two months applying a new-fangled static code analyser to a mature Java/C++ based commercial product.

It was incredible the things it found, many of which absolutely shouldn't even have compiled. Others were super subtle like if statements with a semicolon after the condition, meaning the 'true' block was executed every time.

So many long-running bugs went away after that marathon cleanup. It was interesting whenever a test failed after a round of static code fixes to see how often the test was set up to pass only the wrong code and was failing now it was right.

3

u/a-r-c Sep 25 '26

It was incredible the things it found, many of which absolutely shouldn't even have compiled. Others were super subtle like if statements with a semicolon after the condition, meaning the 'true' block was executed every time.

then you find out it was a load bearing bug and the true block was the only code that worked 😭