Literate Programming
In a white paper of 1984, Donald Knuth once wrote:
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.
He went on to describe his concept of literate programming:
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.
So, I'm thinking and writing along these lines.
Literate Programming Examples
The best way to describe literate programming is with examples. Here is a shell script and some clojure code to give you a taste of what you can do.
Introduction to Literate Programming
Lately I've become quite excited with treating my computer programs as art that I can craft. I figured a simple introduction to literate programming may be in order.
Literate Programming Followup
Links and other bookmarks from my presentation at the Open Source Bridge in Portland, June 2013