47.

We discuss why knowledge of patterns is important to effective creation, implementation, debugging, and maintenance of software; we explain why these patterns have been chosen (and why they are important to your coding efforts); we cover how the patterns are dissected in this book; and we offer a table of "symptoms" for those programmers and designers who want to jump right in and play detective.

Why Is It Important to Know Patterns?

As mentioned earlier (in Chapter 1), bug patterns are recurring relationships between underlying bugs and signaled errors in a program. Knowledge of these patterns and the symptoms they demonstrate is a tool that will let the programmer not only quickly identify occurrences of a bug, but will help him prevent bugs occurring in the first place.

Just as a good programmer needs to know design patterns-patterns which can be combined and applied in various contexts-a good debugger needs to know the common causes of bugs, and how to fix them.

Bug patterns are related to anti-patterns, which are patterns of common software designs that have been proven to fail time and again. Such "negative examples" of design are an essential complement to traditional, positive design patterns. But while anti-patterns are patterns of design, bug patterns are patterns of erroneous program behavior correlated with programming mistakes. The concern is not with design at all, but with the coding and debugging process.

The concept of using patterns, both positive and negative ones, is not novel to programming. Physicians rely on similar types of recurring relationships when diagnosing disease. The problem is that it can take many years for programmers to learn to recognize these patterns through experience alone.

If we identify such patterns and teach them explicitly, we can leverage the experiences of many programmers to improve the effectiveness of each.



Bug Patterns in Java
Bug Patterns In Java
ISBN: 1590590619
EAN: 2147483647
Year: N/A
Pages: 95
Authors: Eric Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net