Interview with Donald Knuth(informit.com)
informit.com
Interview with Donald Knuth
http://www.informit.com/articles/article.aspx?p=1193856&rll=1
9 comments
Why 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.
"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).
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).
I'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) uses a fair amount of literate programming, perhaps you'd like to check it out.
I 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.
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.
Interestingly, 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
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
I've used noweb (http://www.eecs.harvard.edu/nr/noweb/) with Python and Emacs for about a year. Not for everyone, but I love it.
'With the caveat that there’s no reason anybody should care about the opinions of a computer scientist/mathematician like me regarding software development, let me just say that almost everything I’ve ever heard associated with the term "extreme programming" sounds like exactly the wrong way to go...with one exception. The exception is the idea of working in teams and reading each other’s code. That idea is crucial, and it might even mask out all the terrible aspects of extreme programming that alarm me.'
Knuth is the Warren Buffett of computers: phenomenally successful because he's a master of fundamentals, with an uncommon share of common sense. Also, a great writer (of books and software).
He also has an uncommon humility considering his achievements that really commands attention when he speaks or writes. You just don't ever get the "hidden agenda" vibe from Donald. Its very refreshing.
Wow: "During the past 50 years, I’ve written well over a thousand programs, many of which have substantial size. I can’t think of even five of those programs that would have been enhanced noticeably by parallelism or multithreading."
That is a pretty amazing point - I am betting most people will ignore that.
Whilst current CPU trends are to "wider" architectures - how much of that is lack of innovation in the CPU design area rather then some major actual shift - ie will we see new CPU innovation in the near future where explicit parallelism is less of an issue?
Having said that, parallel friendly functional languages like erlang and haskell have so many other advantages, maybe its worth shifting in that direction anyway.
Whilst current CPU trends are to "wider" architectures - how much of that is lack of innovation in the CPU design area rather then some major actual shift - ie will we see new CPU innovation in the near future where explicit parallelism is less of an issue?
Having said that, parallel friendly functional languages like erlang and haskell have so many other advantages, maybe its worth shifting in that direction anyway.
"Yet I think that a few programs, such as Adobe Photoshop, will always be superior to competitors like the Gimp—for some reason, I really don’t know why!"
See, that's what a name like The Gimp does. Even smart people will believe your product is inferior - backed-up by no real argument what so ever ;)
See, that's what a name like The Gimp does. Even smart people will believe your product is inferior - backed-up by no real argument what so ever ;)
Although maybe he's wrong about Photoshop vs Gimp, I still think he is correct in saying that some programs just can't be done in an open source manner. A better example might be something like Second Life - there is no way that could have evolved the way most open source software evolves now.
Some things just require immense dedication and concentration from a large amount of people from the very start - and in an open source project, you can't get that until you have a sizable project already done.
Some things just require immense dedication and concentration from a large amount of people from the very start - and in an open source project, you can't get that until you have a sizable project already done.
I don't know what part or aspect of SL you think couldn't have been done Open Source, but there was this company called Nevrax who developed and launched this MMO called Ryzom. It was not a commercial success, but it got done, and it was open sourced all along, which AFAIK did't hurt them much.
Edit: http://www.fsf.org/news/free-ryzom (where it also says Linden Labs has GPLed the client code for Second Life, back in 2007.)
Edit: http://www.fsf.org/news/free-ryzom (where it also says Linden Labs has GPLed the client code for Second Life, back in 2007.)
" ... that might well be because I’m a very strange person"
I completely agree he does sound like a very strange person, some of his opinions are not what you would expect from a person in stature, to the degree that made me doubt the integrity of this interview
If people didnt know he was Don Knuth he would have been easily acused of being a troll
He also sound like a very opinionated and passionate person
I completely agree he does sound like a very strange person, some of his opinions are not what you would expect from a person in stature, to the degree that made me doubt the integrity of this interview
If people didnt know he was Don Knuth he would have been easily acused of being a troll
He also sound like a very opinionated and passionate person
A troll?!
I rarely hear people describe their ideas with as much self reflection as Knuth in this interview.
I rarely hear people describe their ideas with as much self reflection as Knuth in this interview.
Which of his opinions are not what you would expect from a person of his stature?
'I have special [...] Emacs keyboard shortcuts that make bookwriting a little bit like playing an organ.'
I do grant that web browsing probably will get better with multicores. I’ve been talking about my technical work, however, not recreation.
What??? Web browsing is only for recreation? Perhaps, he meant that it is recreation for him...
What??? Web browsing is only for recreation? Perhaps, he meant that it is recreation for him...
From the article: "I also must confess to a strong bias against the fashion for reusable code. ... you’ll never convince me that reusable code isn’t mostly a menace."
???
???
Knuth is solving different problems than Joe Average programmer.
I don't think anyone will argue against reusing existing databases, web frameworks, etc. when you are writing a web app. But if you are, say, writing a new typesetting system... who cares about reusability? You just need to make it work. The components aren't typically used elsewhere in that case, so your priority should be writing a good typesetting system, not writing reusable parts.
I think that's what he's saying, anyway...
I don't think anyone will argue against reusing existing databases, web frameworks, etc. when you are writing a web app. But if you are, say, writing a new typesetting system... who cares about reusability? You just need to make it work. The components aren't typically used elsewhere in that case, so your priority should be writing a good typesetting system, not writing reusable parts.
I think that's what he's saying, anyway...
You left out the explanation of Knuth:
"To me, "re-editable code" is much, much better than an untouchable black box or toolkit."
This is how I understand it (and how I use it): I always try to improve and write my code more elegant and more adapted to the problem I want to solve. Old code is always the basics that I copy and edit to make it fit into a new and improved environment.
Generic pieces of a library that have been used in many places cannot be modified without very expensive investigation of the consequences on existing code. These investigations are not only boring and time consuming. If they exist (always!) you just limit yourself. Thats because you have to solve your problem AND keep in mind not to harm existing code. This is not what writing software should be about.
Patterns like the decorator may be a way out sometimes. But if used too extensive the resulting code will be too ugly for my taste.
"To me, "re-editable code" is much, much better than an untouchable black box or toolkit."
This is how I understand it (and how I use it): I always try to improve and write my code more elegant and more adapted to the problem I want to solve. Old code is always the basics that I copy and edit to make it fit into a new and improved environment.
Generic pieces of a library that have been used in many places cannot be modified without very expensive investigation of the consequences on existing code. These investigations are not only boring and time consuming. If they exist (always!) you just limit yourself. Thats because you have to solve your problem AND keep in mind not to harm existing code. This is not what writing software should be about.
Patterns like the decorator may be a way out sometimes. But if used too extensive the resulting code will be too ugly for my taste.
"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?