December 5, 2005
DAC 2005: Notes on Mateas and Montfort’s “A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics”
(Update: The full paper “A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics” by Michael Mateas and Nick Montfort is online.)
They approach the podium. The screen goes dark, then blue. There is some struggling with cords and configurations. Fingers and bodies struggle with the oppressive apparatus, and conquer it. Their title and names appear on the screen. Then we begin.
Montfort, looking dapper in a trademark wrinkle-free button down blue shirt, black pants, black shoes and wearing a multiplicity of university-issued rings, began the presentation by invoking Donald Knuth’s discussion of reading the program SOAP as like “hearing a symphony.” Montfort then discussed the idea of code as having an aesthetic for human readers. He cited the observation from Maurice Black’s dissertation that while terms like “elegant” and “beautiful” flow freely in discussions of code in computer science, they have been exiled from the vocabulary of literary and cultural theory. This idea of an established notion of coding aesthetic provides a context for the discussion of the “dark side to coding,” obfuscated code, which is “contrived to foil human legibility rather than enhance it.”
Nick then provided a demonstration of several examples of “hello world!” programs — the elementary computer program often used as a first example (so elemental that even I have implemented it, in BASIC in junior high school). The programs Nick demonstrated also all performed the same function of printing “hello world!” to the screen, however the set of instructions they use to do this are particularly tortuous and obfuscated according to different sets of aesthetics. Nick pointed out that all the examples of obfuscated code he provided “explore the play in language, the free space that is available to programmers.”
Nick provided several examples of obfuscated code, all of which produced the same output, each with its own aesthetic or sense of parody. The most compelling example, which Nick explained in some detail, was MeowChow — the appearance of most of the code was like the helixical structure of DNA, in the form of a large piece of ASCII art. Nick walked through the procedure by which that text undergoes a series of transformations. Like all of the examples Nick provided, the compelling thing about MeowChow is that is essentially a work of art that exists not on the surface level of the user’s experience, but instead in the text of the code and in the complexity of the transformations used by the computer to process it.
Mateas, sporting a meticulously sculpted goatee that gives him the look of a somewhat shorter but more procedurally literate latter-day Lenin, then took the stage to explain the concept of weird languages.
Weird languages are not designed for practical use; they are languages which exploit the play possible in language design itself. Mateas provided examples of weird languages based on parody, Turing minimalism, structured play, and puzzle languages, but explained that this list is not meant to be a definitive taxonomy.
Intercal by Don Woods, 1972 — the Ur weird language. Ambition to have a compiler language that has nothing at all in common with any other major languages. Parodying the syntax of four other languages. Explicitly designed to be ugly.
Brainfuck by Urban Muller, 1993 — Canonical minimalist. Turing minimalist. Eliminating all free play. The smallest possible set of instructions that are Turing-complete, that could be used to operate a generalized computer.
Malbolge by Ben Olmstead, 1998 — designed explictly to be difficult to program in. No known working examples of Malbolge programs for two years after it was released. All programs are auto-self-modifying, and include features that make it difficult to program in.
Chef by David Morgan-Mar, 2003 — Programs are also recipes that should not only create valid output, but should also be easy to prepare and delicious. Structured play.
Mateas and Montfort’s presentation was both amusing and served to demonstrate that there is a manipuable layer of aesthetics in programming, both in the way that a given program is coded in a given language and in the design of languages themselves. As the conclusion of their paper states, weird languages and obfuscated programs “invite theorists and critics of new media to look into the dark box of the machine and see how creativity is at work in there, too.”