The purpose of this research is to identify what makes source code beautiful. At first somewhat counter-intuitive -why should something ultimately understood by a machine as binary voltage current be deemed “beautiful” or “ugly”?- the fact that source code can be aesthetically pleasing is almost universally acknowledged by programmers, digital artists and hobbyists alike. However, whether there are specific, identifiable formal mechanisms which can elicit beauty in code has yet to be clearly defined. My research consists in looking at source code through the field of literary theory, by treating it as literary text, asking questions about form, authorship, readership, distribution and reception in the context of written scripts. The purpose of identifying the aesthetic properties of source code is to see to what extent these relate to, or differ from, the aesthetic properties of written language, and what is their relationship with the necessities of running code. By looking at the tension in what is at the same time a machine-readable text and a human-readable text, I aim at showing how different understandings of beauty enter in dialogue with each other.
This research intends to open up new readings of source code, using the lens of aesthetics in order to better understand code as a specific semantic apparatus, and not exclusively as a purely theoretical notion, or as an effective procedure. Particularly, this research contributes to the broader endeavor of demystifying code and better understanding the shifting, diverse human aspects which come into play during the practice of writing and reading code, while at the same aiming to identify some of the forms that could inherently bring out beauty in what is both a tool for expression and for action.
Overall, I’ve identified a dynamic which starts from broad theoretical work establishing a definition of software as a socio-technical and cultural object (MacKenzie), towards close, deliberate readings of source code in more recent work (Montfort et. al., Paloque-Berges), complemented by an approach from the field of literary studies (Marino, Hayles). The object of source code is more and more the object of focus of researchers, particularly in terms of what code means, how it represents the world, and how it is represented in the world (Sondheim). However, little attention has been given to what kind of intrinsic formal properties it should exhibit to be qualified as “beautiful”, and what definitions of “beautiful” can source code fulfill. More than regular source code -taken from, say, the Linux kernel-, some types of source code appear recurrently in these studies.
Amongst those, the body of texts of self-defined source code poetry has been given close attention, but yet again mostly in terms of socio-cultural practices, and what they mean within the communities of programmers within which they were written and read. Additionally, these focus particularly on staples such as Perl Poetry, the Obfuscated C Code Contest and well-known esoteric languages, and often stop short of linking back their findings to the broader corpus of “everyday source code”. Within the realm of “artistic code”, Paloque-Berges’s work is closest when it comes to analyzing the specific forms that source code poetry takes, and what kinds of relationships those forms have with natural languages. She does so both by paying attention to syntactical tokens that make Perl uniquely suited to this kind of endeavour, but also by providing larger theoretical frameworks, based on the idea of fiction (Goodman) and of practice (De Certeau), but not specifically on the diction of code, on its formal syntactical and semantic properties.
While all these axes overlap each other, it is the syntax/semantics axis which my research takes. Indeed, I hypothesize that it is possible to touch upon these other thematical axes through the lens of form. As Cramer states that formalisms […] have a cultural semantics of their own, even on the most primitive and basic level. With a cultural semantics, there inevitably is an aesthetics, subjectivity and politics in computing, a formal analysis of what makes source code beautiful will enrich the social, fictional, and practice-based approaches that existing studies have already addressed.
The proposed approach is threefold: empirical, theoretical and artistic. The basis of this research will be constituted of primary sources: source code available online, published in hobbyist magazines, commented in textbooks or published as artworks. The analysis of these texts, along with the discourses around those texts (comments, reviews, discussions) will help develop a heuristic to understand when and how the criteria of the beautiful, as well as the ugly, is summoned among communities of programmers. This corpus encompasses all ranges of project sizes, languages and periods, from the Apollo IX landing module procedure, to the snippets published in fanzines, or the examples shown in style guides, as well as the more obvious recent publications of source code poetry.
The second component of this process will be to examine the findings from the analysis of this corpus at the light of the somewhat more traditional concepts of literary theory, such as authorship, reception, rhetorical figures, style, voice and layout, among others. This will establish a framework which takes into account both the practices and appreciations intrinsic to the communities of practice of source code, as well as further highlight some unique aesthetic properties of code via literary methods of analysis. For example, there could be an exploration of the concept of simplicity by comparing the programming paradigm DRY (Don’t Repeat Yourself) and Barthes’s writing degree zero.
Finally, I intend to complement this approach by writing source code myself, putting into practice the concepts unearthed as the research unfolds, with the triple aim to (1) illustrate concepts developed in the second, theoretical, component of my approach, (2) possibly invalidate such concepts by showing their limitations in a concrete instance and (3) open up new pathways for thinking through what can make code beautiful.
The presentation of this research at the xCoAx doctoral symposium could help me in different directions. First, I would be interested in discussing what is their own relationship to writing and reading code, and whether or not they have specific aesthetic standards they hold source code to, whether code they’ve written or code they’ve read, as well as code they’ve encountered that was hailed as being beautiful. While in-person discussion and qualitative interviews isn’t part of this research process, I envision a discussion to be particularly helpful at this stage of the project. Moreover, I see this symposium as an opportunity to discuss what are some of the beauty standards that an object like source code, a techno-semantic object, can be held up to -whether it is about what it does, how it does it, for whom, on which medium, etc.
I would also aim to discuss the progress of my work so far. While I have been working in this field for several years, this is the first year of my doctoral work. Therefore, the stage at which my research is would be particularly prone to discussions around some of the following: which texts I should further include in my corpus, which theoretical approaches I might have overlooked, and which are some practical approaches which could further help illustrate the concepts developed in my writing. Furthermore, since I aim at having already fleshed out such concepts by the time of the symposium, I would be looking forward to getting feedback on some of the conceptual frameworks for approaching the aesthetics of code that I would have elaborated by that point.