Thursday, December 12, 2024
   
Text Size
Login

Site Search

What are Patterns

From Dick Gabriel

Various people write things like this:

"A pattern is a proven solution to a problem in a context."

I suppose I cannot argue with the actual words, because they are not obviously false, but I fear that this can represent a misconception.

Alexander writes:

Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution.

I'm sure that because he wrote this many feel that the rewording above is a fair copy. I don't think it is. Alexander is capable of writing simple sentences when the thought he wishes to express is simple. He could easily have said "a pattern is solution to a problem in a context" - he uses most of these words already.

But, instead he wrote the paragraph above and he went on to explain:

As an element in the world, each pattern is a relationship between a certain context, a certain system of forces which occurs repeatedly in that context, and a certain spatial configuration which allows these forces to resolve themselves.

As an element of language, a pattern is an instruction, which shows how this spatial configuration can be used, over and over again, to resolve the given system of forces, wherever the context makes it relevant.

If you walk into a room and you ask Alexander to list all the patterns he sees, he will not look for sheets of paper with patterns written on them, he will look at the room and tell you the ones he sees in the spatial configuration. Similarly, if asked what patterns there are in a software system, an astute patterns person will look at the code and try to list them off.

Each pattern is both a statement in a pattern language and a configuration in a program. I don't think the words in the first quote above capture that. For example, according to it a pattern might be:

Problem: How do you allocate objects in memory?
Context: A large OO system in a virtual memory computer.
Solution: Run some typical problems and figure out which objects communicate frequently in a time locale and put them on the same page.

This is not a pattern. It is merely a solution to a problem in a context. It can be made into a pattern by talking about configurations of objects that communicate according to a particular definition of efficiency in a virtual memory system. One can imagine other things that might be a pattern according to the over-simple definition, such as the way to figure out the number of things in a "this many sets of this size" problem is to use multiplication.

Alexander could have written a 1-sentence definition of what a pattern is, or an essay, but instead he wrote a 550-page book to do it. Because the concept is hard.

I would prefer to see a definition that was more mysteriously worded with a reference to a longer piece, such as

Each pattern is a three-part rule, which expresses a relation between a certain context, a certain system of forces which occurs repeatedly in that context, and a certain software configuration which allows these forces to resolve themselves. [See "A Timeless Way of Hacking."]

 


Patterns have roots in many disciplines, including literate programming, and most notably in Alexander's work on urban planning and building architecture. (Alexander, 1977).

The goal of the pattern community is to build a body of literature to support design and development in general. There is less focus on technology than on a culture to document and support sound design and principles . Patterns have been used for domains as diverse as development organization and process, exposition and teaching, and software architecture. 

A pattern language defines a set of patterns along with some ordering constraints where the patterns contain pointers to related patterns that help complete them. But this is not enough. Alexander uses the idea of a “sequence” to teach designers and builders how to construct a coherent artifact. Without some ideas on how to sequence one’s design thoughts, the underlying pattern language is likely to be mostly a diagnostic tool.

Today, the pattern discipline is supported by several small conferences, PLoPs sponsored by The Hillside Group which includes a rapidly growing body of literature.


 

Support the
Hillside Group

TPLoP

Learn More about Patterns

Disclaimer

Important: PLoP® is a registered
    trademark of The Hillside Group.

© Copyright 1994 - 2024, All Rights Reserved

Login Form