On the Aesthetics of Computer Science
Aesthetics are a notoriously difficult subject to write about. It is all too easy when seeking the mot juste that will capture and transmit an aesthetic sensation, to sound like a bad wine critic flailing around for appropriate analogues - chocolate, tobacco with a hint of bergamot, and so on.
Further, to understand that a subject can be aesthetised is not necessarily to partake in the aesthetic. Thus, I understand that chess can be beautiful, I comprehend that the sacrifice of a valued piece for a positional advantage, only revealed as play progresses, may engender in the skilled player an aesthetic response, but I cannot share it. Mathematics is similar. I am a user of mathematics but not myself a creative mathematician, I have only a most limited sense of mathematical beauty. Of course, I appreciate that it can be appreciated, and when I read, say, G.H Hardy's 'A Mathematician's Apology', probably the most cogent attempt to explain mathematics to a lay audience, I grasp the shape of the aesthetic but not, as it were, the substance.
On the whole popularisers of science have, with good reason, steered clear of the aesthetic component, preferring instead to focus on the 'wonder of nature'. Wonder is however, only a limited component of an aesthetic response. It is the equivalent of amazement at the craftsmanship of an art work, or the skill of a musician, but stops short of an authentic response. Most scientists are sensitive to the 'wonder of nature' and indeed this might have motivated their initial interest in their subject, but their work is often sustained by a sense of the beauty of science beyond this.
In some senses, engineering has it easier. An aesthetic response to an engineering artefact - an ingenious mechanical contrivance for instance - can come close to the appreciation an engineer has of their work. For that narrow class of system where form follows function, in particular, it is possible to comprehend the choices that the engineer has made and to grasp the overall 'composition'. Of course, there are many systems for which this is not true. A good example is the design of solid fuel rocket boosters which retain their structural integrity by virtue of the pressure of the fuel they contain (they are, in effect metal balloons). This is not apparent from an external view, though the scale is, but is inherent to an appreciation of the design.
Computer science is particularly sensitive to aesthetics. Indeed, the language of computer science is saturated with terms that relate to the aesthetic properties of 'solutions', elegance primary among them. The work of many of the most admired computer scientists - Robin Milner, Don Knuth, Edsger Dijkstra, David Parnas to name a few - have a strong, almost dominant, aesthetic component. As in so much else, we borrow an aesthetic sensibility from both mathematics and engineering. We tend to value solutions that are sparing of resources - time, memory, and so on - and are both surprising but also in some senses simple. A solution should be independent of the particular computational technology on top of which it is implemented. Where an algorithm or architecture simultaneously partakes of a structure amenable to formal analysis but also evident engineering utility it is commonly judged beautiful. Struggling, as I anticipated I would, I reach for an analogy: we look for something like 'narrative clarity', the capacity of a solution to explain itself. The taste of most computer scientists runs strongly to abstraction, that is solutions that exploit the inherent abstract nature of the phenomenon of computation and the many levels on which it can be understood and analysed.
Unfortunately, the price of entry to an aesthetic appreciation of computer science is a high one. The mathematical and technical prerequisites are substantial, but beyond that, a degree of fluency is required, as for example in appreciating poetry in foreign language. I judge our chances of engaging a broad audience with this to be minimal. We should however be unafraid to draw attention to the aesthetic dimension of our work. Even without a direct appreciation it can be understood to shape our science and direct our work. It is also a basis for a contribution of cultural value beyond the benefits that the application of our science delivers.
Aesthetics are, of course, central to the university educational experience. We seek to endow our students with taste and style, though it is difficult to find room for these in a formal taxonomy of course outcomes, not least because we, rightly, doubt our ability to evaluate them with any degree of consistency. We are successful in some cases, perhaps too few. I think it essential however, that we develop a stronger and more explicit discourse around aesthetics and that we expose our students to this.
I was, not so long ago, introduced to algorithms for achieving synchronisation in distributed file systems. Here, the need to achieve consistency among replicas must be traded against availability. The approaches adopted in operating systems are elegant examples of what computer science can achieve. Learning about it gave me intellectual fulfilment and pleasure substantially beyond that of knowing how something difficult could be achieved. Take a look you might enjoy it too.