Software Tools

Do one thing well, and work together.

Nine Debugging Rules

leave a comment »

Dave Agans enumerates nine rules in his short book, Debugging. As a reminder, the rest of this post lists headers from the rule chapters, formatted in one page for my cube wall.

Understand the system. Read the manual. Read everything, cover to cover. Know what's reasonable. Know the road map. Know your tools. Look it up.

Make it fail. Do it again. Start at the beginning. Stimulate the failure. Don't simulate the failure. What if it's intermittent?. What if I've tried everything and it's still intermittent?: a hard look at bad luck; lies, damn lies, and statistics; did you fix it, or did you get lucky?. "But that can't happen". Never throw away a debugging tool.

Quit thinking and look. See the failure. See the details. Now you see it, now you don't. Instrument the system: design instrumentation in; build instrumentation in later; don't be afraid to dive in; add instrumentation on; instrumentation in daily life. The Heisenberg Uncertainty Principle. Guess only to focus the search.

Divide and conquer. Narrow the search: in the ballpark; which side are you on?. Inject easy-to-spot patterns. Start with the bad. Fix the bugs you know about. Fix the noise first.

Change one thing at a time. Use a rifle, not a shotgun. Grab the brass bar with both hands [stop and look, examine and think, then act]. Change one test at a time. Compare with a good one. What did you change since the last time it worked?.

Keep an audit trail. Write down what you did, in what order, and what happened [easier if you're recording your steps anyway in idiom files]. The devil is in the details. Correlate. Audit trails for design are also good for testing. The shortest pencil is longer than the longest memory [and automation is faster].

Check the plug. Question your assumptions. Don't start at square three. Test the tool.

Get a fresh view. Ask for help: a breath of fresh insight; ask an expert; the voice of experience. Where to get help. Don't be proud. Report symptoms, not theories: you don't have to be sure.

If you didn't fix it, it ain't fixed. Check that it's really fixed. Check that it's really your fix that fixed it. It never just goes away by itself. Fix the cause. Fix the process.

Advertisements

Written by catena

15 May 2006 at 2350

Posted in debugging

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: