Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
add comment

closed as not constructive by Mark Trapp Dec 15 '11 at 20:08

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

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.

share|improve this answer
    
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) –  LennyProgrammers Feb 18 '11 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 '11 at 9:10
add comment

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.)

share|improve this answer
add comment

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