Download PDF version of this article PDF

Book Reviews

Why Programs Fail: A Guide to Systematic Debugging

Andreas Zeller, Morgan Kaufmann, 2005, $54.95, ISBN: 1558608664

Sadly, debugging is an often-neglected topic in software engineering education. Although preventing errors in the first place is certainly desirable, to err is human, to rectify is wise, and to learn from mistakes is a must.

Why Programs Fail attempts to provide a systematic approach to finding, reproducing, and fixing programming errors, with a strong focus on the automation of many debugging techniques. Before delving into the details of debugging techniques, author Andreas Zeller covers some prerequisites every software developer should be acquainted with—in particular, problem-tracking systems and testing techniques.

Once the stage is set, Zeller explores the debugging process in depth. After tracking the problem in the database, the first task in debugging is reproducing the failure as stated in the original problem report. It provides the foundation upon which the debugging process is built. Once you have a reproducible problem, you can proceed and simplify it with delta debugging, an automated method to simplify test cases. Debugging then consists of obtaining a theory that explains the bug. Zeller advocates the application of the scientific method and suggests the use of a debugging logbook to make debugging explicit.

The core of the book deals with techniques for creating hypotheses and determining the failure causes of observed problems. Deductive techniques cover the whole gamut of static analysis tools, from program slicing to specialized code smell detectors. Most debugging techniques, however, are dynamic by nature. Observational techniques include logging, dynamic slicing, using debuggers, and introducing assertions to detect contract infringements automatically and to discard infection sites. Inductive techniques help make debugging more efficient by focusing on aspects of a failing run that differ from normal passing runs. Efficiency is also the focus of experimental techniques that try to automate the search for failure causes and failure-inducing program states.

This is an outstanding practical book that explores many interesting ideas. In the near future, we may see many of them integrated within our development environments. If you would like to improve your detective skills as a programmer, this is certainly the book to read. —Fernando Berzal

Reprinted from Computing Reviews, © 2007 ACM, http://www.reviews.com

acmqueue

Originally published in Queue vol. 5, no. 1
Comment on this article in the ACM Digital Library








© ACM, Inc. All Rights Reserved.