workspace on the run RSS

snippets of projects, life and work

Archive

Jun
17th
Wed
permalink

Misconception 1: “A pattern is a solution to a problem in a context”. This is one of Alexander’s definitions, and calling it a misconception will be heresy to some. But a simple counterexample will make its deficiency clear:
Problem: How do I redeem my winning lottery ticket before it expires?
Context: The dog ate the ticket an hour before the deadline.
Solution: Cut the dog open, fish out the ticket, and run to the nearest redemption station.

This is a solution to a problem in a context. It is not a pattern. What’s missing? At least three things:

1. Recurrence, which makes the solution relevant in situations outside the immediate one.
2. Teaching, which gives you the understanding to tailor the solution to your variant of the problem. Most of the teaching in real patterns lies in the description and resolution of forces, and/or the consequences of application.
3. A name by which to refer to the pattern.

Patterns: The Top Ten Misconceptions
John Vlissides
Object Magazine, March 1997
http://www.research.ibm.com/designpatterns/pubs/top10misc.html