The cluster‎ > ‎Software‎ > ‎

Literate Programming

D. Knuth, 1984 :

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

E. Dijkstra, ACM Turing Lecture, 1972

" hopes that tomorrow’s programming languages will differ greatly from what we are used to now: to a much greater extent than hitherto they should invite us to reflect in the structure of what we write down all abstractions needed to cope conceptually with the complexity of what we are designing.

[...]In computer programming our basic building block has an associated time grain of less than a microsecond, but our program may take hours of computation time. I do not know of any other technology covering a ratio of 10^10 or more: the computer, by virtue of its fantastic speed, seems to be the first to provide us with an environment where highly hierarchical artefacts are both possible and necessary. This challenge, viz. the confrontation with the programming task, is so unique that this novel experience can teach us a lot about ourselves. It should deepen our understanding of the processes of design and creation, it should give us better control over the task of organizing our thoughts."

Dijkstra didn't know about literate programming... Knuth devised it around 1983.

Donald Knuth, master of us all, has long advocated literate programming as the way forward for technical programming, but these ideas have been superbly ignored by the large majority of people who code for science (let's not even mention people who just "code"). The core concept behind literate programming is to describe what you want to do and code it all at the same time, making sure that humans can understand what you’re doing, not just machines.

There's a great website to learn more about that paradigm.