What makes Pattern Languages work well?
A position paper for EuroPLoP’02
Mary Lynn Manns		Linda Rising
manns@unca.edu		risingl@acm.org

The call for position papers asks the question:  How do you mine a pattern language?  This paper addresses this question.  It proposes some ways to mine patterns, and in doing so, suggests patterns in the language, Fear Less:  and other patterns for introducing new ideas into organizations, as a way to implement some of the mining methods.

The most common approach, of course, is to mine one’s own experience.  Pattern authors often document what they have seen over and over again.  

It may require a bit of a Personal Touch to encourage a person to write a Pattern of Their Own.  When someone wishes to contribute but does not want to take the time to write patterns, a Ghost Writer can do this instead.  One way to begin is to ask a domain expert, such as a Respected Techie, to tell a story about a project.  The pattern miner can ask some well-placed questions, such as:  How did you decide to do that?  Have you ever done that before?  Why didn’t you choose to do something else?  People love to share what they know, what they care about, what they are proud of.  Other questions that may get them started are:  What would you tell a novice who was assigned to help you with your job?  What would you want to tell other people if you were going to retire tomorrow?  All gurus have a history of projects they’ve saved.  When they tell what happened, pattern ideas bubble up all over the place.  

Even when it is difficult to get an idea from scratch, showing people examples of existing patterns can prompt ideas for other patterns.  This technique is particularly valuable when one is working towards creating a language.  When individual patterns are discussed, the patterns that are missing from the evolving language often emerge.  

Meetings, presentations [such as a Hometown Story or a Big Jolt speaker] and books can also be sources for patterns.  As notes are taken, ideas for potential patterns can be recorded in the margins, and these patterns can then be written later.

One of the best times to apply patterns and discover new ones is during refactoring.  The restructuring of existing code to add new functionality provides a fresh way of looking at the existing design and seeing things that weren’t visible before.  From this, opportunities to apply known patterns are uncovered and ideas for other patterns are born.

Patterns can also be Gold Mined from existing documentation.  Giving a pattern name to what is already part of the way an organization does business allows the notion of patterns to seem less threatening.

There are also various brainstorming techniques that can be used when a group of experts in a particular domain is gathered.  The session can begin with a list of problems the experts commonly encounter – everyone loves to talk about their problems.  During the discussion, each problem is documented on a flipchart paper, and all are displayed around a room.  Participants can then be asked to walk around and make any type of comments on any of the papers that inspire them – things that create the problem (forces), situations in which the problem has been encountered (context), a potential solution (solution), and thoughts on what will occur if the solution is used (consequences).  As participants iterate over this exercise, each flipchart page is likely to be filled with a large of information that may then be written into a pattern by interested individuals.

A brainstorming activity such as this can be part of a pattern writing class.  This class is likely to be most effective when a team takes it together because each participant usually writes about a problem that others in the team can relate to and understand.  Patterns that can help new writers in such a class include Hero Story, My Gold Nugget, Pattern Writing Guided Tour, Play-by-Play Workshop.  

Project retrospectives are probably the most natural place to collect pattern ideas when people make the Time for Reflection.  Norm Kerth has written an excellent book (Project Retrospectives:  A Handbook for Team Reviews) on conducting retrospectives in a relaxed, nonthreatening, and often fun way.  Through activities such as “Develop a Timeline”, “The Emotions Seismograph”, “The Artifacts Contest”, “Passive Analogy”, and “Offer Appreciation”, participants uncover what worked well and what should be done differently.  From this, successful practices can be recorded into patterns, rather than into long, boring reports that people rarely read.

The bottom line is that it is difficult for someone to simply sit down and write a pattern.  People often don’t know what they know.  This short paper offers some effective pattern mining techniques.  Although most of them are useful for mining individual patterns, authors who are interested in building a language must consider how each pattern they mine and write relates to other patterns.  These relationships need to be noted in all sections of an individual pattern, such as the context, problem, solution, and resulting context.  

The use of successful mining techniques and the recognition of how the individually mined patterns relate and can work together go a long way to help create “pattern languages that work well.”

Kerth, Norm.  Project Retrospectives:  A Handbook for Team Reviews.  Dorset House, 2001.

Manns, ML, Rising, L.  Fear Less:  and other patterns for introducing new ideas into organizations. http://www.cs.unca.edu/~manns/intropatterns.html