The fine art of computer programming
Free software and the future of literate programming
Download the whole article as PDF
- 2005-08-05
- Focus | Intermediate
-
Write a full post in response to this!
The free software and open source communities are changing what it means to write code. Specifically, they are extending its audience from a few fellow employees to, theoretically, anyone in the world who wants to read it. Code isn’t just for computers and colleagues anymore and, gradually, we are seeing the beginnings of a body of literary critics and an appreciative readership for source code. What is happening is the gradual realization that reading code can be enjoyable, that code can be artistic as well as correct, and that in the decades ahead some coders will emerge as true artists of an exciting new literary genre. Code is becoming artistic and it’s the free software and open source movements that are making this possible.
Reading code for pleasure
Diomidis Spinellis, author of Code Reading: The Open Source Perspective, is one of the first of what we will come to know as the literary critics of code. His book is unlike any other programming book that came before it and for a very exciting reason. What makes it unique is that Spinellis is teaching us how to read source code instead of merely how to write it. Spinellis hopes that after reading his book, “You may read code purely for your own pleasure, as literature” (2). What I want to emphasize here is that word pleasure. As long as we merely view code as something practical; as a means designed, for better or worse, to reach certain practical ends, then we will never see the flourishing of the literature that Spinellis describes. What must happen first is the cultivation of a new audience for code. We desire a readership that derives a different sort of pleasure from reading magnificent code than those who have come before them. Whereas, generally speaking, most readers of code today judge code based on the familiar criteria of precision, concision, efficiency, __ and correctness, __ these future readers will speak of the beauty of code and the artistry of a well-wrought script. We will, perhaps, print out the programs of our favorite coders and read them in the bathtub. Furthermore, we will do so for no other reason than that we will enjoy doing so; we will as eagerly await the next Miguel de Icaza as we would the novels of our favorite author or the films of our favorite director. Even now, the first rays of this new art are shooting across the horizon; tomorrow, we will shield our eyes against its brilliance.
Richard P. Gabriel and Ron Goldman’s fabulous essay Mob Software: The Erotic Life of Code makes many of the points that I will attempt to explicate here. One of their theses is that “When software became merchandise, the opportunity vanished of teaching software development as a craft and as artistry”. For Gabriel and Goldman, faceless corporations have reduced coding to a lowly craft; code is just another disposable product that is only useful for furthering some corporate agenda. Such base motives have prevented coding from flourishing as a literature. Gabriel and Goldman describe the pitfalls of proprietary software development and ask a rather compelling question:
It’s as if all writers had their own private companies and only people in the Melville company could read Moby-Dick and only those in Hemingway’s could read The Sun Also Rises. Can you imagine developing a rich literature under these circumstances?
Newer models of software development aim to change this unpleasant and unproductive situation. As more and more skilled programmers and clever hackers license their code under the GPL or dedicate it to the public domain, a literature of code will slowly but surely emerge into public consciousness. Still, my point here is that it will take more than a huge body of available source code for coding to become an art. We will need bold and enlightened critics—we will need our Aristotle, our Horace, and our Alexander Pope. These “literary critics of code” will show us how to read great code and how to recognize and appreciate the beautiful as well as the useful.
What we need today are coders who are at once brilliant coders, expert judges, and artists of sufficient taste to convincingly explain to the rest of us how to know great code when we see it
Alexander Pope wrote his Essay on Criticism in 1711, when he was only 23 years old. Pope’s essay, written in stunning verses, was one of the earliest works of literary criticism. It was a work designed to teach us how to judge other works of poetry. It is also contains some of the finest and most memorable lines in the history of the English language. Even if you have never heard of Alexander Pope, I bet you’ve heard the line “To err is human, to forgive, divine.” Today, we can read Pope’s essay with coding in mind and consider how writing verses of poetry compares to lines of code—to observe, along with Gabriel and Goldman, that “The connection to poetry is remarkable.” Pope’s purpose is to give advice not only to writers of poetry but also to critics of that poetry—all the while demonstrating his own mastery of both. And who else but a free software programmer could Pope possibly be describing in these lines:
The learned reflect on what before they knew
Careless of censure, nor too fond of fame,
Still pleased to praise, yet not afraid to blame,
Averse alike to flatter, or offend,
Not free from faults, nor yet too vain to mend.
Those who are willing to release their work for public scrutiny are as likely to receive praise and blame. The worthiest among them will profit from both. What we need today are coders who are at once brilliant coders, expert judges, and artists of sufficient taste to convincingly explain to the rest of us how to know great code when we see it. These literary critics will use their code to teach us how it can be beautiful—and inspire even the most humble BASIC programmer to feel something of that glorious and divine spirit that makes artists of men.
What makes Pope’s essay so significant? Besides its historical, creative, and stylistic value, we find in Pope’s essay tremendous literary value. He is at once a master poet as well as a master critic of poetry. This point is perhaps a bit elusive, so I will make it clearer. Pope could have simply written his essay in prose, or, if he were alive and well in 2005, perhaps a bulleted list. He chose instead to write in the same genre he was philosophizing about. Alexander Pope did for poetry what must be done for programming: We need a coder who understands how to read and admire code as well as how to write it.
It is perhaps time to elect a new Pope. To my mind, there is only one man of sufficient merit and tenacity to warrant such an honor: Donald E. Knuth. I nominate Knuth because of the development of what he terms literate programming, an approach to coding that involves incorporating a program’s documentation into its source code—in much the same way that Pope wrote about poetry in a poem, Knuth wants us to write about coding in our code. Author of the classic Art of Computer Programming books, Knuth firmly believes that programming can reach literary proportions. As early as 1974, Knuth was arguing that computer programming is more artistic than most people realize. “When I speak about computer programming as an art,” writes Knuth, “I am thinking primarily of it as an art form, in an aesthetic sense. The chief goal of my work is to help people learn how to write beautiful programs” (670). Knuth’s passion and zeal for artistic coding is revealed in such lines as “it is possible to write grand programs, noble programs, truly magnificent ones!” (670). For Knuth, this means that programmers must think of far more than how effectively their code will compile.
Write a full post in response to this!
Similar articles
Do you like this post?
Vote for it!
Copyright information
This article is made available under the "Attribution" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by/3.0/.
Biography
Matt Barton: Matt Barton is an English professor at St. Cloud State University in Minnesota. He is an advocate of free software, wikis, and the Creative Commons. He also studies and writes about videogames and computing history. Matt also has blogs at Armchair Arcade, Gameology, and Kairosnews.
- Login or register to post comments
- 12937 reads
- Printer friendly version (unavailable!)




Best voted contents
-
Free software heroes: from Stallman to Google, a list of inspiring individuals who made everything possible
Tony Mobily, 2008-06-15 -
Ian Lynch's take on the BECTA fiasco
Tony Mobily, 2008-06-17 -
The Groklaw effect hits Becta. And yes, I am coining a new term
Tony Mobily, 2008-06-15 -
Mail merge in OpenOffice.org
Michael Crider, 2008-06-17
Similar entries
All news
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
A future without Microsoft
Tony Mobily, 2008-06-08 -
Vienna failed to migrate to GNU/Linux: why?
Tony Mobily, 2008-06-09 -
Free software heroes: from Stallman to Google, a list of inspiring individuals who made everything possible
Tony Mobily, 2008-06-15 -
Dubious ads in Free Software Magazine
Tony Mobily, 2008-05-25 -
The Bizarre Cathedral - 6
Ryan Cartwright, 2008-05-25


Dedicated server
I want a code-poem
Submitted by admin on Thu, 2006-03-30 05:34.
Vote!From: Mahthieu
Url: epzactivist@hotmail.com
Date: 2005-10-08
Subject: I want a code-poem
Hi. Very interesting read. I would appreciate an example of great code poetry. Thank you.
I want a code-poem
Submitted by Anonymous visitor on Sun, 2006-09-17 15:59.
Vote!gcc -pedantic -Wall -o life life.c; ./life > k.eml; mail -f k.eml you