The Artima Developer Community
Sponsored Link

Java Community News
Donald Knuth on Multi-Core, Unit Testing, Literate Programming, and XP

38 replies on 39 pages. Most recent reply: Jun 14, 2008 1:09 PM by John Zabroski

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 38 replies on 39 pages [ 1 2 3 4 5 6 ... 39  | » ]
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Donald Knuth on Multi-Core, Unit Testing, Literate Programming, and XP Posted: Apr 29, 2008 12:54 AM
Reply to this message Reply
Donald Knuth, author of The Art of Computer Programming, and a pioneer in the analysis of algorithms, was interviewed by SD Times' Andrew Binstock. In the interview, Knuth shares his views on XP, unit testing, code reuse, multi-core architectures, and the future of software development.

SD Time's Andrew Binstock recently interviewed Donald Knuth, among the pre-eminent computer scientists of all times, a pioneer in the modern study of algorithms, and author of The Art of Computer Programming (TAOCP). In the interview, Knuth talks about a wide variety of topics, including the latest installment of his TOACP on combinatorial algorithms and Boolean functions.

The most interesting parts of the interview relate Knuth's views on several current issues in software development. One such issue is the question of whether one should design a computer program first and then build it, or whether the current trend of the test-code-execute cycle is more effective:

The idea of immediate compilation and "unit tests" appeals to me only rarely, when I’m feeling my way in a totally unknown environment and need feedback about what works and what doesn’t. Otherwise, lots of time is wasted on activities that I simply never need to perform or even think about. Nothing needs to be "mocked up..."

Knuth also believes that developers should think through their programs before writing any code, and disagrees with most tenets of "extreme programming:"

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...

In another segment of the interview, Knuth, designer of the MMIX computer architecture, discusses his views on multi-core processing:

I might as well flame a bit about my personal unhappiness with the current trend toward multicore architecture. To me, it looks more or less like the hardware designers have run out of ideas, and that they’re trying to pass the blame for the future demise of Moore’s Law to the software writers by giving us machines that work faster only on a few key benchmarks! I won’t be surprised at all if the whole multithreading idea turns out to be a flop, worse than the "Titanium" approach that was supposed to be so terrific—until it turned out that the wished-for compilers were basically impossible to write...

How many programmers do you know who are enthusiastic about these promised machines of the future? I hear almost nothing but grief from software people, although the hardware folks in our department assure me that I’m wrong. I know that important applications for parallelism exist—rendering graphics, breaking codes, scanning images, simulating physical and biological processes, etc. But all these applications require dedicated code and special-purpose techniques, which will need to be changed substantially every few years... Even if I knew enough about such methods to write about them in TAOCP, my time would be largely wasted, because soon there would be little reason for anybody to read those parts...

So why should I be so happy about the future that hardware vendors promise? They think a magic bullet will come along to make multicores speed up my kind of work; I think it’s a pipe dream. (No—that’s the wrong metaphor! "Pipelines" actually work for me, but threads don’t. Maybe the word I want is "bubble.")

Knuth has for a long time advocated the concept of literate programming, and on this topic he notes that:

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...

In my experience, software created with literate programming has turned out to be significantly better than software developed in more traditional ways. Yet ordinary software is usually okay—I’d give it a grade of C (or maybe C++), but not F; hence, the traditional methods stay with us. Since they’re understood by a vast community of programmers, most people have no big incentive to change, just as I’m not motivated to learn Esperanto even though it might be preferable to English and German and French and Russian (if everybody switched)...

Jon Bentley probably hit the nail on the head when he once was asked why literate programming hasn’t taken the whole world by storm. He observed that a small percentage of the world’s population is good at programming, and a small percentage is good at writing; apparently I am asking everybody to be in both subsets...

Finally, Knuth also shares his views on code reuse:

I also must confess to a strong bias against the fashion for reusable code. To me, "re-editable code" is much, much better than an untouchable black box or toolkit. I could go on and on about this. If you’re totally convinced that reusable code is wonderful, I probably won’t be able to sway you anyway, but you’ll never convince me that reusable code isn’t mostly a menace...

What do you think of Knuth's take on currently fashionable trends?

Flat View: This topic has 38 replies on 39 pages [ 1  2  3  4  5  6 | » ]
Topic: David Pollak on Scala's Option Class Previous Topic   Next Topic Topic: Dojo 1.0 Released

Sponsored Links


Copyright © 1996-2017 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us