James Tauber's Blog 2005/12/02
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 :-)
by jtauber : Created on Dec. 2, 2005 : Last modified Dec. 2, 2005 : Categories software_craftsmanship : 4 comments (permalink)
The Naming of Musical Notes, Part III
In the next few parts, I'll talk about things using a made-up naming system to make it clearer what's going on with note names.
Let's start off by naming the 12 ascending notes within the octave in 12-ET with numbers in angled brackets:
<1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12>
We'll call these the absolute note names. Notice that this gets us around the problem of which enharmonic spelling to use when talking about a note in isolation.
Now a major scale starting on <1> would consist of the following notes:
<1> <3> <5> <6> <8> <10> <12>
A major scale starting on <3> would consist of the following notes:
<3> <5> <7> <8> <10> <12> <2'>
If we want to refer to individual notes within the major scale regardless of where we start, we can use a different naming. Let's use curly braces to distinguish that type of name:
{1} {2} {3} {4} {5} {6} {7}
Let's call these the relative note names.
The correspondences in our <1>-major scale would be:
<1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12>
{1} {2} {3} {4} {5} {6} {7}
The correspondences in our <3>-major scale would be:
<1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12> <1'> <2'> ...
{1} {2} {3} {4} {5} {6} {7}
Notice that the absolute meaning of {5} depends on the key. In a <1>-major key it's <8> and in a <3>-major key it's <10>.
Notice also that some absolute notes don't have relative note names (or have them in one key but not another. We can overcome this limitation in the relative note naming system by using + to mean one (absolute) note above and - to mean one (absolute) note below.
So <9> could be expressed as either {5+} or {6-} in a <1>-major key and as either {4+} or {5-} in a <3>-major key.
In the next part, we'll continue to use this notation to explain some of the subtleties of note naming in Western music, including what we observed in parts I and II.
by jtauber : Created on Dec. 2, 2005 : Last modified Dec. 2, 2005 : Categories music_theory : 1 comment (permalink)