Saturday, March 30, 2013 [Tweets] [Favorites]

Debug It!

Mark Bernstein:

There are two kinds of tricky bugs. The first is the masquerade party: something is going wrong, it’s clear what the problem is, but that can’t happen.

[…]

One of the great contributions of Martin Fowler’s Refactoring was that it gave a name to one of the best approaches to addressing an intractable bug. If you can’t find the problem, and localization strategies can’t quite pin it down, you can just refactor the hell out of the neighborhood. This may or may not fix the bug, but at least it improves the code. Before refactoring, bug hunts left tracks all over the program in the form of hooks and temporaries and diagnostic writes. Nowadays, bug hunts leave mown lawns and cleaner design.

I also found Debug It! to be a good basic level book. I’m not aware of any good advanced books on this topic. This seems to be the case for most areas of our field.

2 Comments

Have you seen the book "Why Programs Fail"? http://whyprogramsfail.com/
I looked at its accompanying slides and bookmarked it back in 2006, but never actually read it.

Looking at it again, it seems rigorous, but doesn't mention advanced topics like debugging concurrency problems or distributed systems in the TOC. It might discuss them inside, though - the chapter names are very abstract.

@Mike Thanks for the pointer. That looks like it would be worth checking out.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment