Why Might Design Patterns Work?

Before embarking on an experiment, it is useful to develop an explanation, or theory, of why the hypothesized phenomena might occur. If one just compares method A with method B without an idea of why they might differ, it becomes difficult to build a convincing experiment. If, on the other hand, one has a notion of what the underlying cause might be, one can design an experiment that hinges on this underlying cause. Otherwise, one is just fishing in the dark. Also, generalization suffers: one can only claim that the observed differences hold in situations that are close to the conditions under which the experiment was conducted. For learning more about the interdependence of theory and experiment, we highly recommend Chalmers’ book What Is This Thing Called Science? [Chalmers 1999].

Why might design patterns actually improve programmer productivity, software quality, and team communication? Chunking theory provides a possible explanation. This theory was first formulated in 1956, in George A. Miller’s famous paper “The Magical Number Seven, Plus or Minus Two: Some Limits on our Capacity for Processing Information” [Miller 1956]. His theory assumes that human memory consists of short-term and long-term memory. Short-term memory is fast and accurate, but its capacity is limited to about seven, plus or minus two, “chunks.” A chunk is a unit of information. Interestingly, the amount of information contained within a chunk is largely irrelevant. Long-term ...

Get Making Software now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.