Revisting Versioned Literate Programming


Greg Wilson asks about incremental display of source code.

His example shows somewhat the kind of thing I was thinking when I wrote about versioned literate aspect-oriented programming where I said that I'd like a literate programming tool for writing tutorials...

I could write a web and then tangle it to generate the [...] application and weave it to get the tutorial. But as features are incrementally added to the application over the course of the tutorial, conventional literate programming might not be enough. At the very least, some kind of versioning would need to be included.

Greg is talking more about animated display online using Javascript but from an authoring perspective, I think we're looking for a similar tool. Greg's example is really nice for demonstrating how code gets developed at certain insertion points. That starts to touch on the aspected-oriented element I was thinking of (although there are no cross-cutting concerns in his simple case)

Back in March 2004 when I wrote my original post, Dave Long commented:

Literate programming is composing a program source by pasting together a dag of (smaller) chunks.

Versioning, however, is composing a program source by pasting together a list of (sequential) edits.

The former is primarily spatial, and the latter primarily temporal, so it may not be too difficult to keep the two from interfering.

Heck; use the versioning capability to expand chunks in the appropriate environment of a configuration tree, and one would have self-documenting CM.

One thing that occurs to me is that the versioning in what I'm talking about isn't exactly the same kind of versioning you normally do with something like Subversion. It's not about keeping a history, it's about creating a history, so there'd be nothing wrong with going back and changing earlier versions.

I'm still wondering if anyone has built something like this. I haven't had the time :-)

The original post was in the category: software_craftsmanship but I'm still in the process of migrating categories over.

The original post had 4 comments I'm in the process of migrating over.