I’ve been trying to help a client tackle a rather large list of issues (some might call them underappreciated program features), so I’ve been doing a grab-bag of various coding issues. Some JavaScript, some VB.NET, some web services, some database work, yikes! The possibilities on where the code was broken were huge.
I started working on one particular issue and saw some code that looked like it would fix it right away. I changed it and tried out the application. No change. I found some more code that looked like it needed fixing, and fixed it too. Still nothing. So I continued to fix away for the next 30 minutes, fixing nothing and wrecking pretty much everything else.
Finally I stepped back, undid my checkout, and went back to the original code base. I actually went in and figured out how the code really worked, and it was so much simpler than I had originally thought. It didn’t help that the code base was in marginal shape when I got there, but that was no excuse for “code and burn” debugging! I hate learning things I already know the hard way.