Introduction

It is the spring of 2024, and I am facing a perplexing question: what is the origin of software aesthetics? Why do we call some code structures good and other code structures bad, even when the two are doing the exact same thing?

It is strange, after all, that programmers have an aesthetic sense for software. Programming is an unnatural act; no one is born doing it; any layperson looking at code has no particular feelings about it, except perhaps the feeling that it is all horrible gobbledygook. Yet feelings about good and bad code are (once we strip away the learned intellectualisms of "style") practically universal among programmers.

The shallow answer to the question is, of course, that expert programmers have lots of experience with software of all different types. Some of it works well, some not so well. Some is easy to understand, some not. Our aesthetic sense is built by pattern-matching across all these experiences. We learn by trial and error which kinds of code are likely to cause us pain and which are not.

But that answer only leads us to a deeper mystery: why is it that some forms of software work well, and others not so well? What is the origin of the structures that are the object of our aesthetic judgements? And (here is the kicker) why does beauty in software tend to mirror, in abstract form, the forms that we find in beautiful architecture, or in the natural world? The answer to that question, if we could find it, would be nothing less than a "grand unified theory" of value. It would tell us, clearly and certainly, that the difference between "good" and "bad" is not a mere matter of opinion, nor handed down from high on stone tablets, but inherent in all structure — in the very bones of the universe itself.

I begin to write down my thoughts in the hope of resolving my confusion, or at least explaining it to myself. The pages that follow are the result.