2 ms·
Ah, but in literate programming, the challenge is to make sure the code matches the narrative, not the other way around. > I also suppose the modern equivalent
by e12e 10y ago
Ah, but in literate programming, the challenge is to make sure the code matches the narrative, not the other way around.
> I also suppose the modern equivalent of this, in many use cases, is a Jupyter notebook.
Yes - and no. I think when you're writing a document (or working up to a document) - such notebooks will naturally tend toward lp. This our data, here are our cleanup procedures. This can be visualised like so. Thus we can conclude... Etc.
I wonder if lp would catch more on if there was more prose classes given to cs students? afaik most "professional" writers will do a top-down like design; lay out plot elements, fill in chapters. It's how you can write a good book in less than a year. I've seen many authors say that their first book was really slow going, but then as they get better at the craft of writing, they write quicker and better.
I've always found the "top down" design for small programs to be intuitive. They are often: setup, get parameters/configuration, read data/do stuff, clean up.
I think forcing oneself to write a sentence or two for each (no code!), sets one up for success with the first draft. A complement to BDD/TDD in a way. Similar to how explaining something to someone else is a great way to learn it better.