This premier article introduces the notion of bug patterns, an extremely useful concept that will increase your ability to detect and remedy bugs in your code. You will learn about one of the most common bug patterns, which will lay the groundwork for you to begin recognizing and avoiding more advanced patterns. Bug patterns and why they're useful Just as good programming skill involves the knowledge of many design patterns, which you can combine and apply in various contexts, good debugging skill involves knowledge of bug patterns . Bug patterns are recurring correlations between signaled errors and underlying bugs in a program. This concept is not novel to programming.
Medical doctors rely on similar types of correlations when diagnosing disease.
They learn to do so by working closely with senior doctors during their internships. Their very education focuses on learning to make such diagnoses. In contrast, our education as software engineers focuses on design processes and algorithmic analysis. These skills are, of course, important, but little attention is paid to teaching the process of debugging. With the advent of extreme programming and its emphasis on unit testing, this practice is starting to change.