A coworker and I were discussing the finer points of troubleshooting today, and I remembered that I never posted this thought. It’s short and sweet, and for most people it won’t be anything you haven’t heard before, but I can’t let Derek get too far ahead of me.
I recently saw World War Z. Trying not to spoil anything for anyone who would care, let’s say that one character is asked how he or she knew that something he or she had done would work. That character’s answer? “I didn’t.”
Sometimes, if you’re stuck, just try something. Anything to stop standing still. Flip a switch. Clean the solution. Turn it off and on again. As long as what you’re doing won’t make things worse (or even if it can – as long as it can be easily reverted!), you’ll improve the situation. If it works, you’re done. If it doesn’t, then at least you’ve gained that knowledge and ruled out one more variable.
Bonus: In these “just try something” situations, only flip one switch at a time. If you change too much at once, you won’t know what actually fixed the problem.
Extra bonus: Keep track of which changes you make, in which order, and which ones you revert.
Added extra bonus: If you feel that you are often thrashing in debug and troubleshoot cycles, check out Debug It! from PragProg. I read it some time ago, and IIRC it was pure gold.
This post originally appeared on The DevStop.