MessiandNeymar

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, January 25, 2013

Debugging: a very short review

Posted on 4:12 PM by Unknown

Computer books come in all sorts of flavors. There are textbooks, users manuals, reference works, etc.

This short book by David Agans doesn't fit easily into any of the common categories: Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems.

Debugging is one of those funky parts of the programming profession that doesn't get talked about very much. I'm not sure why that is, because it's quite clear to me, after three decades of programming, that debugging skills are one of the crucial characteristics that distinguish successful programmers from failed ones:

Successful programmers are able to debug programs, whether or not they wrote them initially.
I've seen a lot of people who wanted to become programmers, and failed, and in many of those cases the part they struggled with was debugging. They could write programs that were quite clear, well-designed, neatly-expressed.

But no program ever works correctly the first time; as the great Donald Knuth said: "Beware of bugs in the above code; I have only proved it correct, not tried it."

So, to be a successful programmer, you have to learn how to be successful at debugging.

Many programmers think that debugging is some sort of magical ability; either you have it, or you don't. I don't think that is true; I think you can learn debugging skills, and, much more importantly, I think you can improve your debugging skills.

Agans's short, fun, highly-readable book is a great way for you to learn or improve your debugging skills. Here's what Agans says about the goal of his book:

In this book I'll introduce the nine golden rules of debugging, then devote a chapter to each. I'll start each chapter with a war story where the rule proved crucial to success; then I'll describe the rule and show how it applies to the story. I'll discuss various ways of thinking about and using the rule that are easy to remember in the face of complex technological problems (or even simple ones).

The rules themselves are online, at Agans's web site, and they are nice and short and to-the-point:

  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

You can get a sense of Agans's light and slightly tongue-in-cheek style as you read the rules, but in fact I like all his rules and think they're great.

If I could add one rule of my own, it would be:

Don't be afraid to try something.
I see so many people get stuck in debugging where they know there's a bug, and they can reproduce the bug, but they don't know what to do next. When I see this happen, I say to them: "what have you tried?"

Often, just asking them what they've tried gets them going again, but other times people are paralyzed by a fear that changing something is going to make matters worse.

Well, it might. But, you can't let that stop you from at least trying something. It may not be the right thing, but try it, and you'll learn from your experiment, and that will help break the paralysis.

Anyway, regarding Agans's book, I was pleasantly surprised: even after 30 years of experience, I found it a rewarding read, and I recommend it to anyone who's considering spending a significant portion of their life as a computer programmer.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Shelter
    I meant to post this as part of my article on Watership Down , but then totally forgot: Shelter In Shelter you experience the wild as a moth...
  • The Legend of 1900: a very short review
    Fifteen years late, we stumbled across The Legend of 1900 . I suspect that 1900 is the sort of movie that many people despise, and a few peo...
  • Rediscovering Watership Down
    As a child, I was a precocious and voracious reader. In my early teens, ravenous and impatient, I raced through Richard Adams's Watershi...
  • Must be a heck of a rainstorm in Donetsk
    During today's Euro 2012 match between Ukraine and France, the game was suspended due to weather conditions, which is a quite rare occur...
  • Beethoven and Jonathan Biss
    I'm really enjoying the latest Coursera class that I'm taking: Exploring Beethoven’s Piano Sonatas . This course takes an inside-out...
  • Starting today, the games count
    In honor of the occasion: The Autumn Wind is a pirate, Blustering in from sea, With a rollocking song, he sweeps along, Swaggering boisterou...
  • Parbuckling
    The enormous project to right and remove the remains of the Costa Concordia is now well underway. There's some nice reporting on the NP...
  • For your weekend reading
    I don't want you to be bored this weekend, so I thought I'd pass along some articles you might find interesting. If not, hopefully y...
  • Are some algorithms simply too hard to implement correctly?
    I recently got around to reading a rather old paper: McKusick and Ganger: Soft Updates: A Technique for Eliminating Most Synchronous Writes ...
  • Don't see me!
    When she was young, and she had done something she was embarrassed by or felt guilty about, my daughter would sometimes hold up her hand to ...

Blog Archive

  • ▼  2013 (165)
    • ►  September (14)
    • ►  August (19)
    • ►  July (16)
    • ►  June (17)
    • ►  May (17)
    • ►  April (18)
    • ►  March (24)
    • ►  February (19)
    • ▼  January (21)
      • Ora et Labora: a very short review
      • Cloud Computing reading list
      • Here comes the sun!
      • A patient departure
      • One Million Square Feet
      • Debugging: a very short review
      • Northern California Perfection
      • Stuff I'm reading this weekend
      • Jeff Hodges on distributed systems
      • Overseas Reymar
      • Statistical evidence of fraud
      • Kingdoms of Amalur: Reckoning: a very short review
      • Tata Steel 2013 has begun
      • Aaron Swartz
      • Greatly exaggerated rumors
      • Virtualization
      • Performance behaviors can be very non-linear
      • SHRDLU is wrong!
      • How Complex Systems Fail
      • Computer programming remains the province of experts
      • Happy New Year!
  • ►  2012 (335)
    • ►  December (23)
    • ►  November (30)
    • ►  October (33)
    • ►  September (34)
    • ►  August (29)
    • ►  July (39)
    • ►  June (27)
    • ►  May (48)
    • ►  April (32)
    • ►  March (30)
    • ►  February (10)
Powered by Blogger.

About Me

Unknown
View my complete profile