NOTE: This blog has been moved to http://www.looksgoodworkswell.com

Sunday, December 16, 2012

Indispensable Principles for Debugging - Book Recommendation

Don't judge a book by it's cover (or it's website... or it's poster). Especially true in this situation. David Agan's book "Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems" is a great find, chocked full of simple wisdom on how to find and fix bugs. Some of you will be turned off by his use of Comic Sans (see his note at the bottom of his website for his funny comment on why he sticks by his comic sans guns).

What it is not.
It is not a tutorial for any debugging tool. It is not a primer for debugging in any specific language. It is not an exhaustive tome on debugging. It doesn't have specifics on debugging for the web.

What it is.
Short and sweet. It contains 9 principles that are timeless and can be applied to any system you are trying to debug. Timeless aspect.

Why this book?
I have often wondered why some engineers seem to be able to debug and fix issues and others just create a mess when they try. Of course some minds work in a more systematic manner than others and some have more insight. This book teases out the principles that underly finding and fixing issues. The principles are dead simple and completely obvious when you glance at them. But I promise you that a lot of our colleagues don't practice even a portion of these.

I also like this book because it is a little older and it doesn't try to tie itself to the current trends. One of his first "war stories" is about debugging one of the original Pong games. Love it. First published in 2002, and then again in 2006, it is kind of hard to find. I bought the last 7 copies from ebay today but you can get it from the kindle bookstore.

Nine Principles

  1. Understand the system
  2. Make it fail
  3. Quit thinking and look
  4. Divide and conquer
  5. Change one thing at a time
  6. Keep an audit trail
  7. Check the plug
  8. Get a fresh view
  9. If you didn't fix it, it ain't fixed

Do you have other suggestions for teaching the basics of debugging? Comment below.

4 comments:

Subbu said...

When same code works in some env and not in another , it is almost always data related.

Dave Agans said...

Hi Bill,
Just thought I'd let you know that I just revamped the DebuggingRules website, and the comic sans is gone -- new website tools don't even allow it. :-) The original was created with the Netscape browser-editor, and looked bad for a number of reasons other than the font.
Also, note that the "hard to get" is just Amazon's turf war with my publisher's printer. They say out of stock because they only pre-order 5 at a time, but when you order it comes in quickly. Of course, per your suggestion, you can get it for kindle instantly. Also, Barnes and Noble online has the paperback in stock.
I appreciate the comments about the cover, that was the publisher's design. As was the dry and wordy subtitle -- I wanted to call it Debugging (When Luck Fails and Prayers Go Unanswered). :-)
Thanks for the kind review!
Dave Agans

Bill Scott said...

Haha. Thanks Dave! The Comic Sans didn't really bother me :-) I just know some folks who react to that sort of stuff. The material is timeless. I sent copies to my various teams around the globe. Good stuff.

Ron Miller said...

"When same code works in some env and not in another , it is almost always data related."

I have found this to be true as well. It's a great tip to pass on.