Donald Knuth
581
and our program will do it for them. So there’ll be a few programmers in
the world who write the libraries, and then there are people who write the
user manuals for these libraries, and then there are people who apply these
libraries and that’s it.
The problem is that coding isn’t fun if all you can do is call things out of a
library, if you can’t write the library yourself. If the job of coding is just to be
finding the right combination of parameters, that does fairly obvious things,
then who’d want to go into that as a career?
There’s this overemphasis on reusable software where you never get to
open up the box and see what’s inside the box. It’s nice to have these black
boxes but, almost always, if you can look inside the box you can improve it
and make it work better once you know what’s inside the box. Instead
people make these closed wrappers around everything and present the
closure to the programmers of the world, and the programmers of the
world aren’t allowed to diddle with that. All they’re able to do is assemble
the parts. And so you remember that when you call this subroutine you put
x0, y0, x1, y1 but when you call this subroutine it’s x0, x1, y0, y1. You get
that right, and that’s your job.
Seibel: Many people will agree with you that, yes, it’s more fun to write
the code yourself. But other than the fun—
Knuth: It’s not only fun. The job of a mathematician is to make proofs but
almost never, when you’re solving a mathematical problem, do you find a
theorem for which the hypotheses are exactly what you need for the
problem you’re solving. Almost always you’ve got something that’s sort of
like the theorem that’s in the book. So what you do is you look at the proof
of that theorem and you say, “Oh, here’s how I have to change that proof in
order to prove the hypothesis that I really have.” So mathematical books
are packed with theorems, but you never plug in exactly the theorem—you
want to see that proof because it’s one time in a hundred when you’ll find
just the theorem that you wanted. I think it’s exactly the same with
software.
Seibel: Yet isn’t software—I think you’ve said it yourself—about the most
complex thing human beings have ever made?