Beauty in the product, not the process

Even though the code in DNA isn’t beautiful, its product is. The beauty of the product lies in the eye of the beholder. The beholder bases their metric for beauty on how much the product’s existence helps it succeed—the particular contribution is irrelevant, whether food, mate, or secure abode.

The quality of DNA is only visible once the organism executes its instructions. Only the outcome of growing as an unfolded sequence of decisions and actions on materials can reveal the true beauty. The product does not measure beauty directly. Implanted into organisms are heuristics for whether something is relevant to their success. These heuristics are the senses of beauty.

We may find the helix elegant to view and the processes of the cell captivating, but these are not beautiful in the sense we are looking for right now. I will explain this, and cakes, later.

DNA expands into an organism based on the organisation of the cell that initiates the process. The way a cell divides and changes behaviour based on proximity to other cells is a complex dance of interaction and contextual behaviour. Christopher Alexander called this step-by-step but analogue motion of change unfolding[NoO1-01]. Even when they aren’t biological, such as with buildings, the unfolding process can be applied by someone interested in starting small and designing outwards from a point. They can adapt, split, extend, and differentiate as the space reveals what they should do next.

The process of evolution affects the choices of the cells doing the unfolding, not often the unfolding itself. DNA code changes, merges, splits, and splices. How the cell replays that code into protein production is hardly ever impacted. Unfolding as a process—cells splitting and responding to their context—must also have evolved. But it’s fundamental. So, it behaves as part of the larger environment upon which evolution plays out. The unfolding process may seem natural and beautiful to us, but it’s uniform across the domain of almost all living things, so it cannot by itself confer advantage. When everyone is literate, literacy is not an advantage. However, the reason why we humans appear to have the upper hand among the animals is down to this very point. We have the power to elevate our unfoldings into new domains.

Beauty is a value judgement by survival machines. Applications need to be beautiful in this domain, so you often see people talk about an application being good or bad, and they can often point out very explicit aspects that prove their point. However, sometimes they drift away without knowing what they dislike about it. That can be the effect of a more profound sense of beauty. Our users will love our programs or hate them. They will prefer them to our competitors’ programs or not. But, as we learned earlier, code must be beautiful in a different domain. We get trapped in destructive code by trying to apply natural beauty value judgements. Remember, we can’t evaluate code by looking at it, as we work with different laws of physics.

Beautiful code won’t look pretty, but it will rapidly make beautiful products. It will create products faster and with a higher survival rate than the competition. That’s the basis. Not the process or how we store our decisions and progress but the ability to safely recombine, adjust or improve, or eradicate waste. Beautiful code is all about maintaining the development environment. No matter how aesthetically pleasing your code is, if the product is low-performing or not novel, capable, or quick to market, then the code is not beautiful.

You might think this means we can declare dirty code, spaghetti, balls of mud, and all sorts of wacky-looking codebases beautiful. And, in a way, that’s correct. However, a very low correlation exists between a coding environment producing good products and it being laborious to work in. Some rough-looking codebases are still around, delivering a valuable service in their niche, but how often do they change? How often do they need to change? Do they have competition? They are not apex predators; they are the earthworms of code.