I'm looking for considerations of the questions "Can code be beautiful?" and "What makes code beautiful?"

Examples would include:

Please note that I'm not trying to start a discussion here, or asking for opinions about what makes code beautiful, or for code you think is beautiful; I'm trying to find stuff that has already been published.

Thanks for your help.

2 Answers 2


Check out the book "Beautiful Code" By Oram and Wilson. (Published by O'Reilly). Its a good read, 20 or so essays by different folks on well what you would expect.

  • I agree. The chapter "Beautiful concurrency" in Haskell is freely available: research.microsoft.com/en-us/um/people/simonpj/papers/stm/… (the site is down as we speak) Feb 18, 2011 at 8:58
  • Thanks, I don't think I have read that one yet. (And my copy of the book is sitting right on the shelf next to me) And from everything I have heard Simon Payton-Jones is an excellent writer/speaker.
    – Zachary K
    Feb 18, 2011 at 9:10

Literate Programming site provides many articles on the approach described by its inventor as follows:

I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: "Literate Programming."

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.

The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author, with thesaurus in hand, chooses the names of variables carefully and explains what each variable means. He or she strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

(Donald Knuth. "Literate Programming (1984)" in Literate Programming. CSLI, 1992, pg. 99.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.