The 7 stages of debugging
(with my deepest apologies to the 7 stages of grief.)
Shock & Denial: But… but… how can this happen? I have unit-tests! And they even pass!! Besides, look at the code, it’s obvously correct. Really, this shouldn’t be happening. Can you even reproduce this?
Pain & Guilt: OMG. The other guy just gave me a reliable reproduction. My code sucks! I’m a worthless moron! How many other bugs are lurking in the code I shipped? I should just quit programming and go into sales.
Anger & Bargaining: To the bug reporters: are you sure you’re calling my code with the right parameters? Maybe there’s a bug in your code. I think my module works as per spec. Maybe you should change the way you call it. Frickin’ morons!
"Depression", Reflection, Loneliness- Life sucks. I feel like puking everytime I see a chirpy colleague checking in code by the shovel-full. I don’t even feel like going into the office anymore.
The Upward Turn: Ohhhh… I see what might be wrong. Hack, hack. Oh! I see where the bug is!
Reconstruction & Working Through: Hack, hack. It’s fixed! It’s fixed! I’m a rockstar coder again! I’m getting back to shipping regular code again.
Acceptance & Hope: I know code will always have bugs, no matter what. Do your best. Test, test, test. And never feel invincible.