You know my methods. Apply them!
—Sherlock Holmes
This chapter makes an analogy between finding a perpetrator or a missing object and finding the cause of a defect.
The first section of this chapter explains how the literature of detection and investigation can be applied to the field of software debugging. The section begins by explaining the worldview of the detective. It presents an analogy in which the software defect is considered a crime, and the programmer is the detective. The second part of this section explains why most famous detective fiction is useless for understanding ways of debugging software.
The second section of this chapter explains the methods of the great Sherlock Holmes and how they can be applied to debugging software. This section begins by reviewing the life and character of Sherlock Holmes. It summarizes the points of Holmes’s methodology that apply to software debugging and expands on the analogy of a software defect as a crime. It concludes by identifying techniques that Sherlock Holmes employs in his detective work, with quotes from the Holmes stories for each technique.