Agans distills debugging techniques down to nine essential rules and includes engineering war stories that demonstrate these principles. This book helped me crystallize my debugging strategy and provided the language I now use to describe my techniques. This book also reinforced the importance of techniques that I have only loosly employed. I highly recommend reading this book if you want to improve your debugging chops and engineering skills. Even veteran debuggers will likely learn a thing or two. Debuggers who naturally use these rules are hard to find.
|Published (Last):||16 June 2016|
|PDF File Size:||16.10 Mb|
|ePub File Size:||16.69 Mb|
|Price:||Free* [*Free Regsitration Required]|
Code flows effortlessly from your nimble fingers, like fine cloth from a loom. Your face is serene, focused, content. Suddenly, a wrinkle appears in your brow, breaking that pleasant mask of serenity. The frown deepens. A bug! A hairy bug lurks fiendishly somewhere in that elegant tapestry of code love. How did the bug slip past you? You were so careful! A frustrated hour passes, then two. We sink so much time into the deep pit that is debugging.
Yet for all the time we spend on it, there is surprisingly little literature written on the subject. I picked up Mr. What wisdom will you unearth inside its pages? Here is a brief synopsis of each of the 9 rules. First of all, you have to understand the system. This is arguably the hardest part, and likely the reason why debugging is so difficult and onerous for most of us. Draw it out on a whiteboard. Test your assumptions with some unit tests and maybe a quick spike.
You can close your eyes, lean back in your chair, and brainstorm possible sources of the bug all day long. Maybe one of those ideas is correct. Pull out your proverbial stick and start poking around in the system. See what breaks, who yells. Start eliminating possible sources of the bug, ideally via a binary search algorithm. Eliminate half the system as a bug-harboring candidate. Then eliminate the next half, and the next half, until the bug is staring at you sheepishly with its creepy bug tail between its legs.
Change one variable and retest. Did anything change? Put it back the way you found it; try another one. This systematic method seems tedious, but you often save time in the long run. This will help prevent you from trying the same thing twice, especially in drawn out debugging sessions, as well as serve as a nice debugging log in case you have to turn over your bug hunting hat to someone else. Sometimes the most mind boggling bugs can be traced back to the simplest of causes — someone unplugged the cable.
Take nothing for granted. Trace your way up the tech stack, from the lowly cable on up to the highest level 7 abstraction. Where are things breaking down? Take a walk.
Talk to a buddy. Describe the problem, whiteboard it. Maybe talking about the issue will trigger something new to try, or your buddy will catch something you missed. Hey look, the bug mysteriously disappeared! Usually the bug comes back, when you least expect it, and with terrible timing. Yes, I recommend Mr. If nothing else, it will help you slow down and take debugging more seriously, which paradoxically, will make you a faster debugger.
Home Publications Posts Projects About. Table of Contents The nine rules of debugging 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. Understand the System First of all, you have to understand the system.
Quit Thinking and Look You can close your eyes, lean back in your chair, and brainstorm possible sources of the bug all day long.
Divide and Conquer Start eliminating possible sources of the bug, ideally via a binary search algorithm. Check the Plug Sometimes the most mind boggling bugs can be traced back to the simplest of causes — someone unplugged the cable. Why is that bug wearing a top hat? Related Spanish for the Inner Gringo: New learning channel! Exploring depth in a shallow world — my takeaways from Deep Work Keyboard shortcuts!
Quickly learn 'em — and never forget. Copy Download.
Debugging: 9 Indispensable Rules
Goodreads helps you keep track of books you want to read. Want to Read saving…. Want to Read Currently Reading Read. Other editions. Enlarge cover.