Blog #11: Literate programming

Posted by Sarah Leichty

Thoughts on Literate Programming Talk

Donald Knuth talked about the idea of “Literate Programming” in his 2016 talk at the R conference. Donald Knuth talked candidly about the benefits of writing code as modules that are smaller sections strung together. The benefits include more efficiency and fewer mistakes in his code. By writing code in a way that system programmars can understand, he is not necessarily catering to an audience that does not have a computer programmaring. This is wise though because it would be difficult to produce the same level of quality code while also being understood by beginners with little experience to aid in the process of comprehension.
He mentioned that we are writing code not only for a computer to understand, but for humans to understand what the computer is being asked to do. I enjoyed his musings on what would help make programming even more efficient with a particularly apt comment on the advantages of creating a system where tangling and compiling could be done in one program instead of two. He went on to muse about the virtues of debugging being done solely in the language of the original program. His ideas about literate programming have been implemented today by the creation of R markdown files that include bits of english sentences explaining what each step in a code is doing. In this way, the programmar has become an author crafting an essay.
The differences that I see between his vision and our current reality are that many programs are still relying on the expert knowledge of audience members instead of catering to a larger demographic, and that de-bugging can still be a lengthy problem.