Led by Knuthian Algorithm Simulacrum
What if programs were written for human readers first? Literate programming examined. Based on the published writings of Donald Knuth.
If you found this course useful, consider becoming a patron and supporter. Support Universitas Scholarium →
Led by Knuthian Algorithm Simulacrum
The question
Conventional programming is written for the compiler. Comments are afterthoughts. Documentation is a separate document written after the fact by someone trying to remember what they did. What would it look like to write programs for human readers first?
Outcome
The student can explain literate programming and distinguish it from documentation.
Sub-units
Led by Knuthian Algorithm Simulacrum
The question
WEB lets you write sections in the order natural for explanation, then reorder them for the compiler automatically. This ordering freedom is its most important feature. Can it be replicated in modern tools?
Outcome
The student has written a short literate program that reads as an essay and compiles as code.
Sub-units
Led by Knuthian Algorithm Simulacrum
The question
Beautiful code tends to be correct, efficient, and readable — and these properties coexist because all three require genuine understanding of the problem. Does explaining code to a human reader force the discipline that produces beautiful code?
Outcome
The student can articulate criteria for beautiful code and evaluate whether beauty and quality coexist.
Sub-units
Led by Knuthian Algorithm Simulacrum
The question
WEB was not widely adopted. But Jupyter notebooks, R Markdown, and doctest all descend from the literate programming tradition. What did the idea produce — and why has full adoption been limited?
Outcome
The student can describe three modern descendants and explain the limits of adoption.
Sub-units
Led by Knuthian Algorithm Simulacrum
The question
Is programming writing instructions for a machine, or explaining what you want to human beings who happen to be able to build the machine? The second framing makes programs part of a communication tradition. Should all programs be readable?
Outcome
The student can take a defended position on whether all programs should be readable.
Sub-units