Friday, February 9, 2007

Software patterns and physicality

I remember reading that a software pattern isn't a feature, it's a bug - an unrealized potential for abstraction. This is a provocative view.

A pattern is some piece of code, a way of doing things, which a designer repeats wherever it is the right solution for a problem. The concept comes from (physical) architecture, where patterns have been found for a number of challenges up from whether to have niches in walls up to where to locate cities.

I believe that there is a distinction between patterns in the physical world and patterns in the informational world. In the informational world, we can create new copies of everything and reuse with variations. In the physical world, we can't.

If somebody finds a clever method to pour concrete - the concrete still has to be poured in every location.
If somebody finds a clever method to navigate a data structure - this method may be abstracted out and applied everywhere, if the environment allows it.

Patterns progress like this:
  • research material
  • known technique
  • generalized, reusable technique (pattern)
  • language construct
  • infrastructure
  • forgotten
If your language is strong enough, you can move beyond the pattern stage.

No comments: