I have been asked to do a video for the Clojure programming group about literate programming and this was a recent reply explaining the idea. I don't think I've mentioned this special property of literate programming before but I think it is one key reason to develop the practice.
Tim ================================================================= > > Personally if you have done or would be interested in doing a quick > > vid cast of how you progress through your workflow, I think that would > > be very interesting. > > Sort of "extreme pair programming with everybody"? :-) > There is no such thing as a simple job but I'll see what I can do. > A watchable video takes time to compose. I am composing the notes for this video and I realized I have a piece of programming information about myself that you probably do not have about yourself. Years ago I wrote a program (Archive) to allow users of a time shared mainframe to back up programs to magnetic tape. This was a single person project. As an experiment I copied every input at the keyboard and every output of every command. I also kept a journal of everything I did, why I did it, and what failed. The key result was that I discovered what I call my personal "irreducible error rate". If I do 100 things I will make 3 errors. This was independent of the task. So typing 100 characters has 3 wrong letters which were mostly caught while typing. Writing 100 lines of code had 3 errors somewhere. Composing email introduces 3 errors per 100 lines of code. Most of the errors were trivial (spelling), some were syntax (missing delimiter), some were semantic (wrong action), some were design (wrong solution). As a result of this measurement I have formed habits to look for the 3 mistakes I know exist. For example, I am writing a book of Axiom graphics images (a "gallery"). I have written 679 equations so far, which are going to create the images. I know there are at least 21 uncaught errors lurking in those equations. So before I attempt to generate the images I will examine them in detail with an eye toward finding what I know is there. Literate programming is both a source of errors and a help. It is a source of errors because I have more typing to do and will generate bad latex and meaningless sentences, as well as the "standard" coding errors. So in some sense I have added to the number of errors I WILL introduce. But the tools, like the compiler, tex and spellcheck will at least warn me of these failures. However, literate programming helps because I am explaining what I am doing to myself as well as others. This really reduces the "big", "costly" errors, those in the design and implementation. There are no tools to help so I have to create a discipline that will highlight these errors as soon as possible. I KNOW my intrinsic error rate. What is yours? What discipline can you apply to your work to find your errors? I'm not sure how to get this important piece of self-knowledge into the video so I thought I'm mention it here. Tim Daly _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org https://lists.nongnu.org/mailman/listinfo/axiom-developer