13 Facts About Literate programming

1.

Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given an explanation of its logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated.

FactSnippet No. 686,920
2.

Literate programming programs are written as an exposition of logic in more natural language in which macros are used to hide abstractions and traditional source code, more like the text of an essay.

FactSnippet No. 686,921
3.

Literate programming tools are used to obtain two representations from a source file: one understandable by a compiler or interpreter, the "tangled" code, and another for viewing as formatted documentation, which is said to be "woven" from the literate source.

FactSnippet No. 686,922
4.

Literate programming was first introduced in 1984 by Donald Knuth, who intended it to create programs that were suitable literature for human beings.

FactSnippet No. 686,923
5.

Literate programming implemented it at Stanford University as a part of his research on algorithms and digital typography.

FactSnippet No. 686,924
6.

The practice of literate programming has seen an important resurgence in the 2010s with the use of computational notebooks, especially in data science.

FactSnippet No. 686,925
7.

Literate programming is writing out the program logic in a human language with included code snippets and macros.

FactSnippet No. 686,926
8.

Knuth claims that literate programming provides a first-rate documentation system, which is not an add-on, but is grown naturally in the process of exposition of one's thoughts during a program's creation.

FactSnippet No. 686,927
9.

The meta-language capabilities of literate programming are claimed to facilitate thinking, giving a higher "bird's eye view" of the code and increasing the number of concepts the mind can successfully retain and process.

FactSnippet No. 686,928
10.

Literate programming is very often misunderstood to refer only to formatted documentation produced from a common file with both source code and comments – which is properly called documentation generation – or to voluminous commentaries included with code.

FactSnippet No. 686,929
11.

Literate programming criticized some matters of style, such as the fact that the central idea was described late in the paper, the use of magic constants, and the absence of a diagram to accompany the explanation of the data structure.

FactSnippet No. 686,930
12.

Classic example of literate programming is the literate implementation of the standard Unix wc word counting program.

FactSnippet No. 686,931
13.

Literate programming was inspired by the ideas of Pierre-Arnoul de Marneffe.

FactSnippet No. 686,932