EXCERPT: Christopher Alexander’s forces

Download MP3

Welcome to Oddly Influenced, a podcast for people who want to apply ideas from *outside* software *to* software. Excerpt: Christopher Alexander’s forces

The /Collaborative Circles/ series contains some content that might be useful independently, for people who didn’t listen to the series (or read the transcripts). This is the first of two excerpts.

Software design patterns were derived from the work of architect Christopher Alexander, specifically his book /A Pattern Language: Towns, Buildings, Construction/.

In my opinion, most software design patterns people underplayed or missed one of Alexander’s most important ideas, that of “forces”. This excerpt describes them. It mentions Michael P. Farrell’s book /Collaborative Circles/ briefly in the beginning, but you don’t need to know anything about that book to understand this excerpt.

≤ music ≥

Patterns are, as they say, “reusable solutions to common design problems”. Equally appropriate would be the phrase “*customizable* solutions.” Alexander did something like what Farrell did: he closely observed a number of examples, extracted common features, and gave them names. Farrell has names like Conservative Boundary Marker. Alexander has names like Stair Seat and Window Place.

Alexander goes a step beyond Farrell in that he tried to systematically work out what problems his patterns were solving and why they work. He does that using what he calls “forces”. I’ll explain that idea in a moment.

First, though, as a digression: I worry you have the negative attitude to *software* design patterns that a lot of people have, and so you just wrote off the rest of the episode. Don’t. Not just yet.

I believe software patterns are an example of how some people applied ideas from *outside* software *to* software – and, unfortunately, failed. That was not through bad motives or ignorance – the authors of the seminal software patterns book, /Design Patterns/, had read and understood Alexander well, probably better than I do. However, they oversimplified by leaving out forces – just for now, they thought. However, due to one thing and another, the idea of forces mostly didn’t make it into the software literature. There are exceptions – Eric Evans’s /Domain-Driven Design/ being the most well-known – but they’re scarce. If you’re interested in more about software patterns, see the video or transcript of my 2017 talk “Patterns Failed. Why? Should We Care?”

That out of the way, let’s talk forces. The word is a metaphor. Consider the masonry arches you find everywhere in older architecture: made of stones, bricks, mortar, cement, that sort of thing. Masonry is strong when you try to squeeze it and weak when you try to stretch it. In the jargon, it’s strong in compression and weak in tension. That has consequences.

Suppose you’re required to build a bridge, meaning a horizontal surface over some empty space. The simple solution would be a series of walls to hold up the floor of the bridge. OK, but now consider a horizontal floor span going from one wall to its neighbor. The span is supported on its ends, but unsupported in the middle. Gravity pulls down on the middle, creating tension. Since masonry is weak in tension, you’d have to have short spans and a lot of walls, which would be expensive, plus awkward if you want any traffic to go under the bridge – like, say, boats going down a river that it spans.

The arch is a clever solution to this problem. Consider an arch made out of bricks. Each brick mostly presses down on the brick next to and below it, meaning that all the bricks are in compression. The full weight of the structure supported by the arch is delivered to the feet of the arch. Some of the force is vertical, which is opposed because the arch is sitting on the ground. Some of the force is horizontal, which can be opposed if there’s the leg of another arch of the same weight pushing against it - like in a bridge with multiple arches. Or, for the end two arches of the bridge, by anchoring them to a strong enough foundation. Essentially the forces transferred down the arch to the ground are balanced by forces *from* the ground, and it’s all compression, all the time.

Alexander, as an architect, treats human desires as forces that metaphorically push people around. For example, pattern 180 of the 253 in /A Pattern Language/ is Window Space. It’s illustrated by a black and white picture of an enclosure that looks built into a really thick wall – more than a meter thick, I think. But actually, I suspect what’s on either side of the enclosure is something like closets. In any case, the enclosure has an open side facing the camera, then two side walls. Within the enclosure, there are two benches sitting flush against those side walls. Each looks to be a good width for one person to sit on. The benches are far enough apart that those two people can face each other without bumping knees. The enclosure is roofed by a pretty little arch. Most of the far wall of the enclosure is a three-paned window to the outdoors. In sum, there’s a place for sitting, with a window to look out of.

The picture is followed by: “Everybody loves window seats, bay windows, and big windows with low sills and comfortable chairs drawn up to them.”

Alexander then describes why that is:

“If [a] room contains no window which is a ‘place,’ a person in the room will be torn between two forces:
1. He wants to sit down and be comfortable.
2. He is drawn toward the light.”

The rest of the Window Place pattern describes what makes a seat near a window into a “place” that gives a pleasant feeling of enclosure.

Understanding the forces is important for understanding how to tailor the pattern without breaking it. I once transformed our front room from a place we didn’t use to the place we use every day: in part by making space to put two rocking chairs alongside our big bay window. That’s much less enclosed than the book’s picture, and potentially has less of a feeling of being a “place”. To make it more of a place, I put a wooden lobster trap – acting as a sort of end table – to my right, so that when I’m typing on the computer on my lap, the bay window’s seat board (or the wide inner sill) is on my left and the lobster trap is on my right. It’s both open and cozy.

For a second example, I’ll use Stair Seats, a pattern to help design outdoor public spaces where people might gather. Its picture shows a front porch with a sturdy railing and five wide steps from the porch floor down to ground level. The stairs are flanked by wide banisters or balustrades. People are sitting on the railing, steps, and balustrades, basically goofing around and chatting. Most of the people are a little or a lot above eye level from the photographer’s perspective (presumably on the street or sidewalk).

Here’s the first of the forces balanced by Stair Seats:

“People seek a vantage point from which they can take in the action as a whole. […] Anybody who is ‘people-watching’ will naturally try to take up a position a few feet above the action.”

But there’s a countervailing force:

“The trouble is that this position will usually have the effect of removing a person from the action. Yet most people want to be able to take the action in and to be part of it at the same time. This means that any places which are slightly elevated must also be within easy reach of passers-by, hence on circulation paths [that’s another pattern], and directly accessible from below.”

Both forces can be accommodated at the same time:

“The bottom few steps of stairs, and the balusters and rails along stairs, are precisely the kinds of places which resolve these tendencies. People sit on the edges of the lower steps, if they are wide enough and inviting, and they lean against the rails. […]

“When there are areas in public places which are both slightly raised and very accessible, people naturally gravitate toward them. Stepped cafe terraces, steps surrounding public plazas, stepped porches, stepped statues and seats are all examples.”

Strictly, there’s a third force, which is that people will want to watch the action while sitting, more than while standing. The need for seats is implied, if not demanded, by other patterns like Sequence of Sitting Spaces, Sitting Circle, and Built-In Seats, all of which speak to how people like to gather, both for watching and for talking. In general, a single part of a built structure will involve patterns working together. The shownotes contain a link to an interesting talk by Ryan Singer about how that works in software.

≤ music ≥

That’s the idea of “forces.” Thank you for listening.

EXCERPT: Christopher Alexander’s forces
Broadcast by