Alternating repetition is the second of three consecutive properties in The Nature of Order which make little sense if you apply them directly to software. It is curious that Christopher Alexander arranged them consecutively, because, as I have mentioned in the previous chapter, Boundaries, this and the following chapter (Positive Space) share a sort of meta-characteristic, which can be pronounced like “the space between the centers is itself a center”.
Given this state of affairs, I am going to use this space to talk more about this meta-property, and how it is inflected by the original geometric property from the book. This is of course after I tell you what it means for buildings.
Buildings tend to have, for instance, structural elements that repeat. Whether they are piers, or bays, or vaults, or columns, or joists, or rafters (they don't have to be load-bearing either, they could be dormers or even ornaments), buildings are full of features that are usually evenly-spaced, identical copies of an elementary structure. Alexander argues that the space is more whole when the gaps between these features are discernible features in themselves.
Alternating repetition is one of the more conspicuous of the fifteen properties, it very clearly manifests the notion of strong centers, the idea that a region of space is a more living structure when there are fewer non-entities in it. Once again, we can pick on Mies as our counterexample: the bays in this structure repeat, but the columns are thin and the space between them is enormous—easily more than an order of magnitude.
Mies Van der Rohe's Neue Nationalgalerie in Berlin features plenty of repetition, but it can't very well be said to be alternating.
For a reference example, we can look at the Eishin great hall again. The thickness of the posts is around the same order of magnitude as the width of the spaces between them. (We will discuss this again when we get to good shape, which is all about aspect ratios.)
The Great Hall at Alexander's Eishin school is unsurprisingly all about the alternating repetition.
Alternating repetition is another one of those properties that elicit detractors of Christopher Alexander to argue that he's just a nostalgic, as we can find copious examples of it in old buildings, and copious examples of it missing in newer ones. At least as valid an explanation—and what makes modernists like Mies and Le Corbusier such easy targets—is the secular change in building materials, and the availability of glass, steel, and reinforced concrete. If you're using these materials, you don't need as much of them to keep the weather out or the building from falling down.
Modernism in architecture is not just about the embrace of novelty and rejection of tradition, but also the leverage of new materials, techniques, and modes of organizing labour. The fact that you need less material to hold up more stuff is obviously going to filter its way into the design. Covering the maximum volume with the least amount of materials was at the centre of Buckminster Fuller's concepts of Dymaxion and tensegrity. (Indeed, he saw it as a moral imperative: use the savings on materials and energy to house the world.) Few things shriek Modernism—and brandish non-alternating repetition—more intensely than a geodesic dome.
I mean, can you possibly get more modernist than EPCOT?
Alternating repetition—or rather, non-alternating repetition—is a good opportunity to conjecture why Alexander believed architecture went to hell after the Second World War. For that, we have to talk more about modernism. An essential characteristic of modernism is the master plan: the conceit that both technology and civilization are in a place that a single genius can (without coercing anybody too conspicuously) orchestrate a massive and complex undertaking. Notwithstanding, modernism grew up in an era prior to massive amounts of cheap computation, so these master plans were hampered by the constraints of paper and blackboard math.
By “modernism” I of course mean the specific cultural movement 19th and 20th centuries, rather than what we would generally consider modernity or the modern era. The book to read on this subject is Seeing Like a State, by James C. Scott.
Now, modernism, architectural and otherwise, was already well underway by World War II. So what makes it significant as an inflection point? Consider this: on a societal scale, art, philosophy, and literature are relatively cheap. A single project might cost an individual, or maybe a small group of people, a few months, years, or even their lifetime—expensive to them, maybe, but virtually costless when amortized over generations on a planetary scale. Buildings, on the other hand, are expensive: they require an enormous coordination of resources and activity. Buildings are commissioned by clients (whether privately or as business or political officials), and the clients will have to be receptive to the proposals of the architects to select and ultimately sign off on them. Such that, if the architect's proposal is informed by some philosophy or ideology or other, the latter will likely need to have filtered through—and be interpreted and reinterpreted by—numerous intellectual generations of culture creators, before it reaches a form which is both consumable by and desirable to the client.
By “intellectual generation” here, I mean the cycle by which somebody advances an idea, through something like art, philosophy, or literature, and that idea is digested and responded to. This process is bounded by the time and effort it takes to respond coherently to a particular provocation. An internet fad can bloom and die off in a week, but more profound intellectual movements, especially in the past, may take years or decades to reach the public consciousness in some interpretation or another. Architects, being among the ranks of producers of culture, may participate actively in this exchange, but their clients are overwhelmingly likely to be passive consumers of it.
Next, the materials, equipment, and organizational choreography needed to efficiently build large construction projects—especially ones that exhibit the characteristics associated with modernist architecture—did not exist all at once until into the 20th century: reinforced concrete, structural steel, diesel-powered machinery, assembly lines, safety glass, etc. That is to say, for instance, that while major works like the Golden Gate Bridge and the Empire State Building are significantly younger than the Bauhaus, and the speculative question is, assuming the respective clients accepted proposals for a bridge or office tower that looked like a Gropius or a Mies, would it even have been possible to build them?
The final consideration is of course the war itself. For starters, it was characteristically mechanized and heavily reliant on science, engineering, and technology. Myriad techniques that had been lying around for decades were invariably sharpened and integrated for the contingency. Next, huge chunks of Europe and Japan had been leveled by bombs, and new buildings would have to be built. Lastly, developers in the US responded to the GI bill—promising to compensate (white) war veterans with cheap mortgages among other things—with large suburban projects like the Levittowns.
What does this all have to do with (non-) alternating repetition? Local adaptation, or rather the lack of it. Master-plan modernism is very much about action at a distance. Alternating repetition is a geometric property you get when you're on the building site, observing the differentiation created by repeating forms (like load-bearing members) and, in a feedback loop, responding to the voids that occur in the spaces between them with additional differentiation. Non-alternating repetition is what you get when you order your load-bearing members from a factory, and any feedback that may have occurred, would only have been on the drawing board.
My argument here (that I'm ultimately borrowing from people like Scott) is that while modernist architects fastidiously planned every detail, they were limited in the amount of detail they could plan. Why would the criticism still hold once modernism had receded as a dominant architectural style, and modeling, imaging, and fabrication technology had vastly improved? There are a few ingredients which I may eventually return to, but one prominent one is the way construction is procured, financed, and managed—still solid 20th-century institutions. So you may be able to design any building you want, but getting it actually built will only happen with the assent of—and in practice at the convenience of—contractors, banks, governments, and possibly organized crime.
This, by the way, was the thesis of Christopher Alexander's final book, The Battle For the Life and Beauty of the Earth.
This highly scalable, “feedback-free” model of organizing can trace its roots to the near-identical disciplines of military and civil engineering, and it is a reasonable claim that this model was perfected during World War II. (Indeed, the war would breed the thinking that would eventually call it into question.) That model is what we in software recognize as Waterfall.
This property is a tough one, because in software the only meaningful repetition to speak of is loops, and it doesn't, at least in the typical case, make sense for loops to “alternate”. Indeed, source code, in its ideal form, is some of the most non-repeating stuff out there. The general rule of thumb when you're writing software is that if you spot a repeated construct, you break it out into a singular one and reference that instead. And, as with the other properties, graphical user interfaces can tap The Nature of Order directly for guidance.
There are more sophisticated looping constructs like the task schedulers in operating system kernels, or generic event buses or message queues, that can have intricate algorithms for alternating between classes of task, but I felt these constructs don't especially capture the essence of the property, nor do they really come up a lot in everyday application programming.
Alexander's colour property, colors create light together, might give us some more clues on how to interpret alternating repetition for software. It is mainly about complementary colours, although not exclusively. It's also the contrast and the respective ratios of a pair of pigments. As for the term “creating light”, I am not a fan of it, since we're almost exclusively talking about removing light, either by filtering or reflecting white light. “Creating light” is one hundred percent a human perceptual phenomenon, even though it obviously has a basis in physics and geometry. The outcome Alexander is seeking with this complementarity is emotional affect, and he argues that a pair of colours in a certain geometric configuration will do it, while even a slightly different pair—or the same pair in a slightly different configuration—will not.
I nitpick about “creating light” because in software we are almost always dealing with luminous display surfaces—to the extent that we deal with display surfaces at all—so our palette choices very literally do create light, whether they “create light” or not. It is worth noting that on a typical graphical display, green is twice as bright as red, and six times as bright as blue, meaning that selecting a palette by numeric RGB or HSV values will probably yield inferior results to a perceptual model like LCh or HSLuv.
To find a coherent application of alternating repetition in software, perhaps we need to go extra meta and consider the complementarity of process and structure: that is, every structure is created by a process, and every process has a structure. Buildings are structures that constrain certain social processes (as mundane as walking in a certain direction) in order to increase the affordance of others. Software code is a structure that describes—or perhaps prescribes—entire processes of its own, which propagate onward to structure social processes in a similar fashion.
The classic tome Gödel Escher Bach is, among other things, about the relationship between process and structure.
Code is a representational artifact—a structure—that tells computers what to do. There are other representational artifacts—flow charts, journey maps, personas and scenarios, wireframes, storyboards, taxonomies of conceptual entities, etc.—that tell programmers what to do. We can say that these intermediate artifacts program the programmers; indeed program the programmers of programmers.
Christopher Alexander pioneered—or more appropriately, rearticulated—this fundamental counterpoint between process and structure for the modern age. He was a prolific creator of representational artifacts—models and mockups, both conceptual and concrete—informed by the current state of the structure, and themselves designed to inform the structure's subsequent states. As I wrote elsewhere, he used the building site itself as a computational medium. This age-old practice is precisely what was discarded by modernists, but anybody who has made sufficiently complex software knows this kind of iterated oscillation is practically non-negotiable. Alexander recognized this, which is why he believed we hold the key to achieving what he ultimately couldn't.