I recently saw David Agans’ book Debugging mentioned in one of the many trade journals I receive (I can’t remember which one). After seeing how much praise it received on amazon.com, I decided to pick up a copy.
Debugging really spoke to me because a large portion of my career has been devoted to finding and fixing hardware bugs. I finished it in just two or three evenings (it’s a quick, fun and engaging read). The examples are particularly interesting and relevant to me because many involve issues with embedded systems. Admittedly, perhaps most fascinating is the one about a living room lamp that turned on anytime the author vacuumed the room.
I highly recommend this book to anyone who regularly troubleshoots issues with any kind of system, software or hardware, mechanical or electrical. This includes engineers of all discplines, circuit designers, computer programmers, helpdesk operators, web developers, auto mechanics, etc.
David’s nine rules of debugging are (with my notes):
Understand the system – Knowing how your circuit, code, or widget is supposed to work will help you fix it. Read the manual!
Make it fail – Knowing how to reproduce the failure is critical to being able to fix it. Also, stimulate the failure, don’t simulate it.
Quit thinking and look – Don’t jump to conclusions and just fix what you think might be the problem. This wastes time when you inevitably guess wrong. Keep an open mind as to what the failure mechanisms could be.
Divide and conquer -Eliminate what is definitely not part of the problem and focus on what’s left.
Change one thing at a time – If you change ten things at once, how will you know which one actually solved the problem?
Keep an audit trail – Being able to reproduce the fix is crucial. Even if you don’t fix the problem, you might discover a pattern or something you overlooked by looking at your notes.
Check the plug – When all else fails, check the obvious stuff that you probably should have looked at first.
Get a fresh view – Someone else may have more experience with the problem than you do or might see the one thing you’re missing.
If you didn’t fix it, it ain’t fixed. – Don’t stop when the problem just disappears. It will surely come back later at the most inconvenient time possible. We’ve all been bitten by this one before. Never again!
I previously posted about Forrest M. Mims III’s Getting Started in Electronics, one of the best books out there for someone who wants a thorough, yet unintimidating introduction to electronic components and circuits.
From the mid-1980’s through the late 1990’s, Forrest Mims also published several mini-notebooks, each dedicated to a specific topic in electronics. Each mini-notebook contains 50 pages of circuits, electronic concepts, and project ideas.
The complete set includes:
555 Timer Circuits
Basic Semiconductor Circuits
Digital Logic Circuits
Formulas, Tables, and Basic Circuits
Magnet and Sensor Projects
Op-amp IC Circuits
Schematic Symbols, Device Packages, Design and Testing
Solar Cell Projects
I had a few of the originals when I was growing up and wish I had kept more of them. I specially remember reading the Optoelectronics Circuits Mini-Notebook in High School. I attempted to build the optical communicator entirely with parts from Radio Shack, which was very difficult 15 years ago, and would be pretty much impossible today!
Updated/compiled versions of the notebooks are available on Forrest Mims’ website, but many of the originals can be found used for less than a few bucks each on amazon.com.
Massimo’s short text is an excellent introduction to the hardware and software sides of the Arduino and contains a walk-through for uploading a sketch to the board, basic programming techniques, interfacing with common sensors, troubleshooting techniques, and some interesting notes about tinkering, physical computing and interaction design. The book is based on a collection of notes that were formerly available within the Arduino wiki. The notes were removed when the book was released, but fortunately I saved a copy and you can download them here.