In 1981, Donald Knuth, the famous computer programmer and professor, developed a philosophy that he calls
“Literate Programming”. Starting from the premise that a good software program should read like a good work of literature, the programmer becomes responsible for writing the source code to be as interesting and informative as possible for readers. In one stroke, by reclaiming the computer program as an art form that a person might want to read, as opposed to a series of instructions that are only comprehensible to a computer, Knuth claims that literate programming will produce programs of superior technical and artistic merit. I agree with him. There are scores of reasons why in this age of complexity, when the cost of software maintenance can be as high as 80% of the total, a literary approach will prove to be more elegant and more cost effective. Programs addressed to a human are far easier to comprehend and tend to have superior structure, making them cheaper to understand and maintain. Literate programming borrows the forms of exposition and introduction from traditional literature, borrows the structure of an essay, mutates them slightly, and employs them towards the pragmatic goals of writing software.