Wisdom, not solutions

If knowledge is knowing how to do something, wisdom is knowing what doesn’t work. Wisdom is experience-based, and the most persuasive experiences are negative feedback. In essence, being wise is learning your lessons and not making the same mistakes again. It doesn’t stop us from making new mistakes, but at least they’re new.

Design patterns are like that. They are often called recurring solutions to problems because they stipulate the invariants of any high-quality solution to a specific problem. Wisdom helps narrow down your options. X is impossible because of Y unless you have Z. These problem-specific constraints help guide someone to a solution. But they are not sufficient to generate a solution, only steer the process. That’s why patterns include examples—as inspiration for what you could do. There are some general motivations for deciding on solutions, such as:

CompatibilityDiscoverabilityDebuggabilityExtendibility
ObservabilityPerformancePortabilityReliability
SafetyScalabilitySecurityUsability

Patterns have warnings in them. They are adaptable in relation to regularly neighbouring patterns. They have principles that have been revealed during many trials and many errors.

Initially, patterns emerged from trying to bring back a straightforward approach. Traditional methods were attractive because of their lack of apparent complexity. Their ability to locally adapt to environmental changes was an attractive feature for Christopher Alexander. But, when he analysed traditional methods in Notes on the Synthesis of Form[Notes64], he found situations in which they fell apart.

The Slovakian peasants used to be famous for the shawls they made. These shawls were wonderfully colored and patterned, woven of yarns which had been dipped in homemade dyes. Early in the twentieth century aniline dyes were made available to them. And at once the glory of the shawls was spoiled; they were now no longer delicate and subtle, but crude. This change cannot have come about because the new dyes were somehow inferior. They were as brilliant, and the variety of color was much greater than before. Yet somehow the new shawls turned out vulgar and uninteresting.

— Christopher Alexander, Notes on the Synthesis of Form, p. 53.

Traditional techniques were stable but had no insight. He couldn’t use them as they were. Tradition is wisdom without awareness. In contrast, intellectual design is awareness without wisdom. Awareness-driven decision-making is limited by mental capacity. These two contradictory solution methods contributed to an apparently unsolvable problem for designing complex forms in the modern world.

What Christopher Alexander wanted to do was create a solution to the two problems of modern buildings. He wished to resolve tradition’s inability to keep up with modern techniques and a rapidly changing environment—because tradition, for all its benefits, becomes ineffective when exposed to rapid progress. He also sought to solve the problem of modern architecture’s inability to handle the inherent complexity of building large, complex structures. After executing a plan from a modern process many worrisome stresses and tensions are left unresolved. Alexander needed a way to construct wisdom from thin air.

The outcome of Notes on the Synthesis of Form was the appearance of patterns. A way built upon understanding the categories of mistakes made by the modern process. A way to reveal new traditions by calculation and intellectual processes. Patterns were discovered wisdom because the mistakes modern architecture was predisposed to making, the things you ought not do, were almost always about unexpected negatively consequential relationships between elements, that is, relationships where changes to improve one part degrade another.

Instead of tackling the problem of complexity head-on, he concentrated his efforts on the category of mistakes. The approach centred on architectural elements from the point of view of relationships of change, focusing on changes affecting multiple elements in opposing ways.

The natural way to decompose a system is by what you know, things you already have names for. In Notes on the Synthesis of Form (p. 127.) Christopher Alexander suggested that when diagramming the decompositions, you should ‘resist the temptation’ to use ‘well-known verbal concepts’ for the new change-connected chunks but instead diagram them so that they don’t lose their power under the influence of pre-existing biases. The reason precedes it: each diagram or name must be both complete and unadorned with any accidental requirements caused by ambiguity or prejudice.

By starting from this different position, he found a way to elicit wisdom from the context and the forces at play. Collecting elements by their impact on each other was one part; how they affected and revealed otherwise unseen compounds made manifest only by the relationships between elements was another unexpected important discovery. These implicit compounds were the first sighting of patterns. They sprang forth from the contexts and forces and were the foundation of the new way of thinking about building.

Without a surrounding context upon which to pivot, and without forces to guide its necessity, a pattern will not emerge. There can be no mistakes if there is no will to induce change. There can be no mistakes if there is no context by which to judge the decision. These points are why most true patterns are wisdom. They contain the impact of mistakes such that they will not be made again.

When you think of patterns as solutions to recurring problems, there’s a problem. They aren’t solutions; instead, they are how any viable solution can be safely reached and verified. When well presented, they capture common structure, behaviour, and control flow in particular domains of any good and valid solution. They’re not so much about capturing the details of solutions already seen but revealing all the regrets you could have had if you hadn’t abided by the restrictions and limitations found by those who walked the path before you.

Good pattern definitions should contain restrictions and limitations guided by positive aspects presented as principles of a high-quality final form. They can be lists of things you would be unhappy about if you hadn’t considered them. Not so much how to do it, but more the kind of story that starts, ‘We know what you’re gonna try to do, so here’s what you need to look at’. In effect, patterns must be stories of your future. Someone else has already gone down your route. They are reporting from your possible future about your plans and how they worked out—even though you haven’t yet taken the first step.

And because they are wisdom, patterns are never about cool ideas. They are always the wisdom captured by others who went through similar situations. Tales told about what happens when you live through it. They’re distilled anecdotes. They’re wisdom. They’re warnings.

Again, patterns aren’t solutions. The solution is usually pretty obvious, but it has to be coached out of you by giving you the right questions. Unfortunately, given the present form, you have to know what the solution entails before finding the ideal pattern to consult. But when you’ve located the pattern, you can use it to better understand your problem and uncover other snags and consequences you hadn’t yet noticed. What else about your solution aren’t you considering? A pattern helps you change your mind. You can be rewarded by learning new constraints, which inspire new opportunities.

Patterns aren’t tools for construction. They’re a way to organise how to use your tools. They’re not reusable techniques for software design as in the verb ‘to design’. They’re reusable wisdom of systems that spring into life around a solution. They provide insight into maintainability, as well as what solution system pairings might look like and their respective consequences.

Innovative patterns

However, not all design patterns seem like wisdom. They might appear to be inventions at first sight, something you wouldn’t easily come across. These patterns are epiphanies, but they are regularly self-forming. They are the inevitable inventions of people put in a context with certain forces. You might wish to think of them as belonging to a slightly different category because they take an inspired leap. They’re not the patterns of trial and error; they’re inventions with some insight and higher thought.

Invention patterns include the use of fire and the bow and arrow. We invented weaving, rope, knots, and sewing many times over. Mathematics and logic emerged from contemplation alone at many points in space and time. These aren’t quite natural patterns, because they need thought to bring into being, but they keep emerging anyway. We refer to them as patterns because they also resolve forces in contexts, but these are the patterns that are often structured solutions. They include a lot more ‘do this’ than ‘avoid that’.

These patterns can appear in nature. Examples such as the eye with a lens to focus might seem like a leap from the pinhole. We know nature doesn’t think, so it’s clear these clever solutions can emerge without thought.

There are fewer invention-type patterns in Christopher Alexander’s work, but they are present, such as 251 Different Chairs or 229 Duct Space. Their presence may have contributed to misunderstanding the purer form of complexity-dissolving, wisdom-based patterns. The inventive patterns are more immediately attractive to programmer types and lovers of puzzles.

Indeed, in pattern literature, it becomes undeniable the more you read about them outside of software development: design patterns don’t stop you from having to think. Instead, they invite you to think more acutely. They give you the inspiration and context to understand what to think about.