Patterns, instructions, standards, rules, protocols

Marco Zanchi
3 min readApr 18, 2020

One of my favourite books is A Pattern Language, by Christopher Alexander. Those of you who are coders are aware of the idea of design patterns, popularised by the gang of four book, Design Patterns: elements of reusable object-oriented software. A few of you will know that the authors were inspired by Alexander’s book, written in 1977.

The idea of the design pattern is very powerful. In its most basic form a design pattern is a template: a set of guidelines that you can use to replicate a form. It’s different from a set of instructions in that an instruction tells you step by step what you need to do, whereas a design pattern is more of a guide on the abstraction layer, the thoughts that you need in order to get to a concrete design, the design then being your own creation.

As an illustration imagine you are learning to play the guitar. If you follow the tabs (tablature) of a song, they will give you precise instructions of which string you need to play, where you need to press on the neck of the guitar, and the tempo. You could in theory translate a tab into computer instructions and have a program execute it.

As you advance on your technique you start to learn some riffs. The song goes from Am to C, so you know a couple of transitions that sound good and when you perform you switch between one and the other, giving the song more flavour. These riffs are little templates; they are not songs, but you can use them to make songs.

A design pattern then would be like a template to make templates. Say you want to create a new riff. You will know that some notes follow others more naturally, and it’s better to do a pull rather than a hammer in certain transitions. A few of these ideas together will form different patterns that you can use to compose new riffs, or understand existing ones and make variations, or simply help you remember them.

This meaning of the word is somewhat different from what most people are used to. In normal conversation you will look at a tapestry and appreciate its pattern, that is, the repetition of a certain image. Or you might argue with your partner and notice that there’s usually a pattern to how you start disagreeing.

There’s an intrinsic idea about repetition: something that repeats in different scenarios. Nothing is the same, they can only look the same. You never cross the same river twice. But the river is a thing, even though the water that composes it is different from moment to moment. The river is a pattern.

Same with ourselves: our cells duplicate and eventually die, being replaced by new cells. So we are not the same people we were last month, or even yesterday. As we breathe, new Oxygen atoms replace the old ones, so we are different from breath to breath. Still, we are the same; our pattern is the same.

What’s the difference between a pattern and a standard? How is a standard different from a rule? And how do these differ from a protocol?

--

--

Marco Zanchi

Interested in mathematics, philosophy, language, and DevOps. Director of engineering at https://multiverse.io