Joe Armstrong
234
Seibel: “You and Your Research”?
Armstrong: He says things like, “Do good stuff.” He says, “If you don’t do
good stuff, in good areas, it doesn’t matter what you do.” And Hamming
said, “I always spend a day a week learning new stuff. That means I spend 20
percent more of my time than my colleagues learning new stuff. Now 20
percent at compound interest means that after four and a half years I will
know twice as much as them. And because of compound interest, this 20
percent extra, one day a week, after five years I will know three times as
much,” or whatever the figures are. And I think that’s very true. Because I
do research I don’t spend 20 percent of my time thinking about new stuff, I
spend 40 percent of my time thinking about new stuff. And I’ve done it for
30 years. So I’ve noticed that I know a lot of stuff. When I get pulled in as a
troubleshooter, boom, do it that way, do it that way. You were asking
earlier what should one do to become a better programmer? Spend 20
percent of your time learning stuff—because it’s compounded. Read
Hamming’s paper. It’s good. Very good.
Seibel: Do you find some code beautiful?
Armstrong: Yes. Why this is I don’t know. The funny thing is, if you give
two programmers the same problem—it depends on the problem, but
problems of a more mathematical nature, they can often end up writing the
same code. Subject to just formatting issues and relabeling the variables and
the function names, it’s isomorphic—it’s exactly the same algorithms. Are
we creating these things or are we just pulling the cobwebs off? It’s like a
statue that’s there and we’re pulling the cobwebs off and revealing the
algorithm that’s always been there. So are we inventing a new algorithm or
are we inventing a structure that already exists? Some algorithms feel like
that. I think it’s more the mathematical algorithms. I don’t get that feeling
when I’m implementing a telephony protocol or something. That’s not a
statue that I’m pulling the cobwebs off.
Seibel: So that’s similar to the beauty of math, because it’s part of nature.
Then there are other levels at which code sort of has an aesthetic.
Armstrong: Yeah. It’s kind of feng shui. I like minimalistic code, very
beautifully poised, structured code. If you start removing things, if you get to
the point where if you were to remove anything more it would not work