We Should Revisit Literate Programming in the Agent Era

12 points by ciferkey


bitshift

The author's definition of literate programming is broader than mine (or maybe mine is just narrow). Jupyter notebooks do mix prose and code, but they're very linear: you can reload everything by running the cells in order, from top to bottom. Whereas to me, literate programming is very nonlinear. In LP you can define things in any order: for example, you could define a class in Chapter 1 so the reader can see the data model up front, but leave the method bodies empty—to be specified in Chapters 4 and 5, which walks through the relevant algorithms.

The fundamental extra labor of literate programming, which I believe is why it is not widely practiced, is eliminated by the agent and it utilizes capabilities the large language model is best at: translation and summarization.

I suspect the "extra labor" is more than just keeping code and prose in sync with each other; that's just the most visible labor. The hard part is making the project teachable, and I think that's a different skill than just explaining what each line does, or summarizing those explanations.