"James Madison wrote: 'If men were angels, no government would be necessary.' If he lived today, Madison might have written: 'If software developers were angels, debugging would be unnecessary.' Most of us, however, make mistakes, and many of us even make errors while designing and writing software. Our mistakes need to be found and fixed, an activity called debugging that originated with the first computer programs. Today every computer program written is also debugged, but debugging is not a widely studied or taught skill. Few books, beyond this one, present a systematic approach to finding and fixing programming errors." - from the foreword by James Larus, Microsoft Research "Andreas Zeller seeks to equip you with a comprehensive arsenal of techniques and the appropriate mind-sets for employing them." Rick Wayne, Software Development, January 2006
"Why Programs Fail" is about bugs in computer programs, how to find them, how to reproduce them, and how to fix them in such a way that they do not occur anymore. This is the first comprehensive book on systematic debugging and covers a wide range of tools and techniques ranging from hands-on observation to fully automated diagnoses, and includes instructions for building automated debuggers. This discussion is built upon a solid theory of how failures occur, rather than relying on seat-of-the-pants techniques, which are of little help with large software systems or to those learning to program. The author, Andreas Zeller, is well known in the programming community for creating the GNU Data Display Debugger (DDD), a tool that visualizes the data structures of a program while it is running. This title is a winner of a 2006 Jolt Productivity Award for Technical Books. It shows how to reproduce software failures faithfully, how to isolate what is important about the failure, and to discover what caused it. It also describes how to fix the program in the best possible way, and shows how to create your own automated debugging tools.
It includes exercises and extensive references for further study, and a companion website with source code for all examples and additional debugging resources.