Debugging, by David Agans

Notes and quotes from Debugging

These are takeaways from the book Debugging, by David Agans.

This book is general; it’s not about specific problems, specific tools, specific programming languages, or specific machines. Rather, it’s about universal techniques that will help you to figure out any problem on any machine in any language using whatever tools you have.

The book introduces the nine golden rules of debugging, and devotes a chapter to each. It starts each chapter with a war story where the rule proved crucial to success; then it describes the rule and show how it applies to the story. It discusses 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). And it gives you some variations showing how the rule applies to other stuff like cars and houses.

DEBUGGING RULES

’’’''

Takeaways

Remember: Understand the System

This is the first rule because it’s the most important. Understand?

Remember: Make It Fail

It seems easy, but if you don’t do it, debugging is hard.

Remember: Quit Thinking and Look

You can think up thousands of possible reasons for a failure. You can see only the actual cause.

Remember: Change One Thing at a Time

You need some predictability in your life. Remove the changes that didn’t do what you expected. They probably did something you didn’t expect.

Remember: Keep an Audit Trail

Better yet, don’t remember Keep an Audit Trail.'' Write down Keep an Audit Trail.''

Remember: Check the Plug

Obvious assumptions are often wrong. And to rub it in, assumption bugs are usually the easiest to fix.

Ask for Help

There are at least three reasons to ask for help, not counting the desire to dump the whole problem into someone else’s lap: a fresh view, expertise, and experience. And people are usually willing to help because it gives them a chance to demonstrate how clever they are.

Remember: Get a Fresh View

You need to take a break and get some coffee, anyway.

Remember: If You Didn’t Fix It, It Ain’t Fixed

And now that you have all these techniques, there’s no excuse for leaving it unfixed.

Remember: The View From the Help Desk Is Murky

You’re remote, your eyes and ears are not very accurate, and time is of the essence.

Remember: The rules are ``golden''

Which means that they’re: