On Patterns…
Thursday, November 20th, 2008I’ve recently stumbled across this post (which, by the way, I highly recommend its reading), which has someway enticed me to add some comments. Now, this doesn’t mean I don’t agree with the author concerning a few arguments; I just want to raise the awareness over some points I find particularly important.
Linda Rising, in the last PLoP conference, said something along these lines: “A pattern shouldn’t be an Ahah! or Eureka! but something more like an Hmmmm!”.
The thing is, a pattern is something recurrently seen in the wild, that try to give an answer to a problem by balancing the forces in some particular way. Not an intelligently crafted solution in the author’s basement. A good pattern is one where a domain expert is able to easily recognize the pattern as: “I’ve seen this!”.
Now, if the GOF’s Design Patterns should have been more or less abstract than they are is ultimately irrelevant; the authors observed those patterns in a particular context, and while they may hold outside that context, that can’t be neither guaranteed nor intended by the authors. That’s why patterns typically have a target audience. In the context they wrote the book, putting additional effort into implementation details have probably lead far more people to grasp it, than it would have been otherwise.
Furthermore, as an example, Ralph Johnson, during the last PLoP workshop, suggested that the patterns I wrote could be generalized far beyond Adaptive Object-Models and into a broader OO perspective. However, that would need a completely different context-problem-forces triplet. Now, someone reading my paper could say: you focus too much on AOMs; you should have generalized. Well, it’s true. But the proposed pattern is intertwined in a specific pattern language, which has it’s own context and forces. For that purpose, I may actually have given too little detail, since several comments I received asked for more in that direction!
Alexander’s work is a great example of what I’m trying to say. The Notes on the Synthesis of Form could, and are easily abstracted into several realms far beyond Architecture. Should we state that Alexander coupled himself into unnecessary detail?
I believe the problem may not be in the patterns per-se (nor even in the GoF book, which should be regarded as a germinal work), but in the people using them. Personally, I think too few people know the GoF book, or for that matter, patterns in general. Those who know and apply them blindly, have completely missed the fact that a pattern is NOT a building block! Maybe that’s why GoF entitled their book as Elements of Reusable Object-Oriented Software, and not Design Rules of Good Object Oriented Software.
Richard Feynman once said: “Know how to solve every problem that has been solved.” I believe the study of patterns endure this ideal. They are not engraved laws of the tissue of software. They are a systematization of intrinsic, almost empirical, observed knowledge.



