3 ms·
I found this part fascinating. "Yet to me, literate programming is certainly the most important thing that came out of the TeX project. Not only has it enabled
by plinkplonk 19y ago
I found this part fascinating.
"Yet to me, literate programming is certainly the most important thing that came out of the TeX project. Not only has it enabled me to write and maintain programs faster and more reliably than ever before, and been one of my greatest sources of joy since the 1980s—it has actually been indispensable at times. Some of my major programs, such as the MMIX meta-simulator, could not have been written with any other methodology that I’ve ever heard of. The complexity was simply too daunting for my limited brain to handle; without literate programming, the whole enterprise would have flopped miserably.
If people do discover nice ways to use the newfangled multithreaded machines, I would expect the discovery to come from people who routinely use literate programming. Literate programming is what you need to rise above the ordinary level of achievement. But I don’t believe in forcing ideas on anybody. If literate programming isn’t your style, please forget it and do what you like. If nobody likes it but me, let it die."
I am a little skeptical of literate programming (especially how it would would work on multi person teams, a circumstance Knuth doesn't face) but when someone of the stature of Knuth is so emphatic, common sense dictates a closer look.
The LCC compiler (Fraser and Hanson) seems to have been developed using literate programming and it is a beautiful piece of code.
I was wondering -- has anyone on news.yc attempted literate programming?
- michael_dorfman 19y agoWhy are you skeptical of literate programming with multi-person teams? It seems to me that the value of literate programming would increase exponentially in relation to the number of people reading the code.
- plinkplonk 19y ago"Why are you skeptical of literate programming with multi-person teams? " I guess it is because I am not convinced about many people working on a piece of prose (vs code). As I understand literate programming, the "text" evolves parallelly with the code. Having said that, I'd be interested in knowing if anyone managed a successful lp project with more than one person (or a couple of persons).
- aflag 19y agoI've done some literate Haskell programming on stuff of my own. I never used it while working with other people, though. I understand that darcs (http://darcs.net http://darcs.net) uses a fair amount of literate programming, perhaps you'd like to check it out.
- fa 19y agoI program a lot of Matlab (going to switch to NumPy any day) for my signal processing research and I too just discovered literate programming. I think it's an incredibly good idea, to switch the status of code and comments---holding myself to the same standards in documenting my programs as I do in writing journal papers (using latex for both), and placing code in special delimiters. This is probably not too important for you web developers but I think it's going to revolutionize my scientific computing. A very nice comment: "Incidentally, with Linux I much prefer the keyboard focus that I can get with classic FVWM to the GNOME and KDE environments that other people seem to like better. To each his own." Let me know if anyone wants an fvwmrc to try out how amazing keyboard focus can be.
- julianb 19y agoI've used noweb (http://www.eecs.harvard.edu/nr/noweb/ http://www.eecs.harvard.edu/nr/noweb/) with Python and Emacs for about a year. Not for everyone, but I love it.
- swombat 19y agoInterestingly, especially looking at the BDD movement, I don't think that unit tests are opposed to Literate Programming. In fact, so long as the unit tests are written in the right language and with the same attention to the reader, they are, in effect, simply an executable version of the "literate" part of Literate programming. One of the best things about BDD/TDD is not the fact that you have tests, but the fact that it forces you to think about what you're going to build and how you'll be interacting with it, before you actually start writing the code. That would seem to be the advantage with LP as well. So it seems it all boils down to "think before you code". Maybe all those development methodologies revolve around that idea, and the desperate attempt to force programmers under time pressure to actually spend the time to think before they write code :-) Daniel