Home > Articles > Programming

Design Patterns for Maintenance

  • Print
  • + Share This
Joshua Engel looks at design patterns from the standpoint of a maintenance programmer, and finds that they're actually more useful read than written.
Joshua Engel is the author of Programming for the Java™ Virtual Machine (Addison-Wesley, 1999, ISBN 0-201-30972-6).
Like this article? We recommend

Design Patterns

As a maintenance programmer, you're called on to read a lot of code. That means you must understand not just the language in which that code is written, but the idioms and conventions used by programmers to create actual programs. These idioms are sometimes called design patterns.

Design patterns are generally conceived as tools for software developers—or, more to the point, software designers. But you need to learn to read idioms as well as generate them yourself. The hardest part of the maintenance programmer's job is reading existing code rather than designing new code. Understanding the design patterns used by the original programmers, and recognizing them when you see them, will greatly improve your ability to maintain code you didn't write.

A number of common design patterns have been collected into a book called (cleverly enough) Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Addison-Wesley, 1994, ISBN 0-201-63361-2). Their goal is not just to collect the patterns but to explain their implications: what their benefits are, what problems are likely to arise, and what you have to do to make sure that you get all the benefits of following the pattern.

In addition, you probably recognize many other patterns that you've written hundreds of times, even if you don't have names for them. Let's look at some sample code and see if it looks familiar.

  • + Share This
  • 🔖 Save To Your Account