Seibel: Then is there any trick to quickly figuring out whether something’sgoing to suit your needs?

Fitzpatrick: I just start. I don’t plug it right into my code—first I write atest program that uses the couple functions I know I’m going to need, makesure they work. Or write a unit test for just that library on just the data Iplan to use with it. A lot of libraries out there don’t even have their owntests. Even if it does, maybe you read the doc and you don’t really trust thatit does what it says it does, or the doc wasn’t clear about how it behaves.So I write my own tests for the shit I care about. I figure since I’m going tohave to write something to learn the library anyway, my first Hello, Worldprogram might as well be a unit test against it.

Seibel: What about the actual tools you use—you’re still an Emacs user,right?

Fitzpatrick: I’m still an Emacs user. I wish I were better at Emacs. But Iknow all the keystrokes but I don’t really customize it much. I steal otherpeople’s customizations and I can kind of read it. But I find myself gettingannoyed by something and saying, “I should go write some Elisp to bind it toa key.” And then I don’t.

Steve Yegge is working on project to basically replace all of Elisp withJavaScript. So I keep saying, I’ll wait for him to do that so I don’t have tolearn another language. I’ll just write it in JavaScript. I don’t mind JavaScriptas a language. It’s browsers that suck. At Google I write a lot of stuff inJavaScript that I then embed in Java and C++. I figure JavaScript is a goodembedding language.

Seibel: Are there any tools that you are forced to use regularly that youjust hate? Other than your whole desktop?

Fitzpatrick: Yeah, the whole desktop. There are a whole lot of things onmy desktop. All these browsers are always hanging and crashing and usingtons of memory. My whole operating system hanging. My coworkers try totell me—if they see me doing something in Emacs—that Eclipse or IntelliJdoes it for them automatically. So every six months I try out one of them,Eclipse or IntelliJ. And the damn thing just sits there spinning forever,consuming memory and maybe crashes in the middle of me typing or can’tkeep up with me typing. Come on—syntax-highlight in the background orcompile in a different thread. Why are you blocking my typing to do this?OK, I’ll try it again in six months, guys. So I’m glad I’m not forced to usethat. I should really get better at Emacs, though.

My learning curve is, I learn something pretty rapidly until I get to this pointwhere I’m pretty productive and good enough. Then I kind of plateau at likemaybe 90 percent or 80 percent, where I’m productive and I don’t have tolook things up and I’m happy. And then it slowly gets better after that. It’sonly after I’m super comfortable with something that I’m like, “I’m going togo dig around the docs for this language—the man pages—and learn everynook and cranny.”

Seibel: Is that maybe wise these days? There are so many things you couldlearn. You could spend forever just learning how to use your editor, andhow much software would you write then?

Fitzpatrick: Yeah, but I’ve always found—at least for your editor—italways pays off. Whenever I learn something, it pays off within, I don’tknow, a week or two. Whenever I write a stupid little shell script in my bindirectory, or a little Perl script, or something to automate my life, it alwayspays off.

Seibel: So you’ve never gotten trapped in the pit of endless toolsmithing?

Fitzpatrick: Nah. I tend to do it for a purpose. I definitely know peoplewho are just always working on their personal tools and never get anythingdone. I can go a little bit more in that direction and be safe, though.

Seibel: What do you think is the most important skill for a programmer tohave?

Fitzpatrick: Thinking like a scientist; changing one thing at a time. Patienceand trying to understand the root cause of things. Especially when you’redebugging something or designing something that’s not quite working. I’veseen young programmers say, “Oh, shit, it doesn’t work,” and then rewriteit all. Stop. Try to figure out what’s going on. Learn how to write thingsincrementally so that at each stage you could verify it.

Seibel: Is there anything that you did specifically to improve your skill as aprogrammer?

Fitzpatrick: Sometimes I’ll go out of my way to write something in alanguage that I would rather not write it in—and I know it’ll take me longerto write in that language—because I know I’ll be better in the end. Likewhen I got to Google, there were a lot of times where I was writing one-offthings and I’d go to write it in Perl. Then I’d be like, “Ah, no, I should writethis in Python.” Now I write tons of Python and it doesn’t bother me—Ibarely have to look things up. Perlbal was originally written in C# just tolearn that.

Seibel: And are there skills apart from programming itself that you thinkwould-be programmers should develop?

Fitzpatrick: There’s communication, but I’m not sure that’s something youcan really practice. Deal with people on mailing lists a lot. Writtencommunication style goes a long way. But that’s a general life thing, right?There was some study about who was successful after high school. Was itthe smart kids or the social kids? It turned out that it was the social kidswho ended up making all the money in life, not the people with the goodgrades. I thought that was interesting.

Seibel: That seems to be a bit of a change from the past. It used to beprogrammers could be gnomes hiding in an office. These days it’s all mailinglists and collaboration.

Fitzpatrick: Well, at the places I’ve worked, either on open source or atcompanies, everyone depends on each other. The motivating factor is, “I’mgoing to write this code because I know you’re going to be needing it in twoweeks or I’m going to be needing yours in two weeks.” There’s always ahuman level.

Seibel: People have claimed that there are orders of magnitude differencesin productivity between the best and worst programmers. Has that beenyour experience?

Fitzpatrick: Yeah, but it’s probably like that in every field. It’s how muchexperience you have. It’s not often the case where I know of two peoplewho do the same sort of programming and have been doing it the sameamount of time, but differ by a factor of ten times. It seems like if you’re notgetting better all the time, you’re probably getting frustrated and you dropout.

I guess there are the people who just do it for a job but don’t really enjoy it.Which is OK. But it’s kind of weird to compare those people with peoplewho are hardcore programmers. What’s ten times more productive whenone person works ten times the hours and thinks about it nonstop and theother person just does it at his job?

Seibel: You just mentioned taking a scientist’s approach to debugging. Doyou consider yourself a scientist, an engineer, an artist, or a craftsman?

Fitzpatrick: Either scientist or engineer. Probably more engineer. I wouldsay scientist was second, but only in the sense of the scientific method ofchanging one thing at a time and how you diagnose problems. Engineer forthe design aspect of things. I definitely have friends who call themselvesartists or craftsmen. I’ve never thought of myself as that.

Seibel: On the other hand, there’s a lot of engineering envy in software.You hear the jokes about, “If people built skyscrapers the way we buildsoftware, the first woodpecker would destroy civilization.” Do you thinkbuilding software is a well-understood engineering discipline?

Fitzpatrick: No. I don’t think it’s there yet. You don’t need a license, right,to write code. Not that I want tons of regulation, but it would be nice toknow that some of these PHP programmers with these XSS exploits aren’tthe same people writing the air-traffic-control system. I’d like there to besome official line between those people.


Перейти на страницу:
Изменить размер шрифта: