Literate programming is a philosophy of computer programming based on the premise that a computer program should be written similar to literature, with human readability as a primary goal.

Traditional programs have human language comments interspersed in computer language code. Literate programs reverse this style, with computer language "comments" interspersed in a human language essay.

An excellent (and simple) literate programming tool is noweb. There is a hello-world example and some intro information on Wikipedia. There are also official quick and 6 page introductions.