I have a friend who’s a structural engineer and he went to school foreverand took all this engineering certification stuff. It’s kind of comforting toknow that the people who build the bridges I’m on studied this shit foreverand took tons of tests and stayed up all the time studying.

Seibel: But what test could you give a programmer that would give youconfidence that they can write software that will work?

Fitzpatrick: I don’t know. It’s kind of scary.

Seibel: Even without licensing, do you think programmers have any sort ofspecial ethical responsibilities to society? We’re arguably a profession, andprofessions have codes of conduct.

Fitzpatrick: You shouldn’t kill anyone. Like with flight-control software.But that’s kind of a rare case. I would like to ask that everyone is consistenton their credit-card forms to like let me put in fucking spaces or hyphens.Computers are good at removing that shit. Don’t tell me how to formatmy numbers. But there’s no ethics there. Just stupidity.

Seibel: You’re 28 now. Do you have any worries that programming is sortof a young person’s game, that you’re going to lose a step as you get older?

Fitzpatrick: No. The worst case, I could always just stop and work on funthings on my own. I don’t feel like I’m competing with anyone right now andI don’t really care if other people are better because I feel like there aretons of people who are better already. I figure we are always in the middleanyway, so I’m happy to stay in the middle.

Seibel: So programming is what you’d do for fun, even if you quit working?

Fitzpatrick: Oh, yeah. I’d still do stupid shit. I have this silly board game onmy phone. I was kind of tired—I couldn’t work on anything serious, so Iwrote a solver for that game. Tried to do some dynamic programming anddid different board sizes and did a bunch of random boards and made ahistogram of how many moves it takes to solve the board for differentboard sizes. I sent it to the author because the game has a really badestimate of par. Basically, to advance in the game you have to do better thanpar. And everyone on the mailing list was noticing that the game got easieras you went on because his estimate of par he kind of pulled out ofnowhere. So I sent him the histograms at every board size. I think in thenew version of the game he adjusted par. That was a fun hack, just on theshuttle home. I could retire and just do dumb shit like that all day.

Douglas Crockford

A senior JavaScript Architect at Yahoo!, Douglas Crockford has been aprogrammer since the early ’70s when he took a Fortran course in college afterbeing unable to get studio time for his major in television broadcasting. Over thecourse of his career, he has combined computers with media in various ways atplaces like Atari, Lucasfilm, Electric Communities, and now Yahoo!

Crockford is, by nature, a simplifier and a tidier. He invented JSON, the datainterchange format widely used in Ajax applications, because he found XML toocomplicated. His recently published book, JavaScript: The Good Parts, argues thatJavaScript is actually quite a nice language if one avoids certain features. When Italked to him he stressed the importance of subsetting as a way of managingcomplexity and described a code-reading process he uses that starts with simplytidying up the code.

At the time of our interview, Crockford had become well known as an outspokencritic of the proposed ECMAScript 4 (ES4) revision to the ECMAScript (JavaScript)language standard, on the grounds that it was too complex. He was in favor of amore modest proposal labeled ES3.1, and since then he and the other ES3.1advocates have largely prevailed—ES3.1 has been renamed ES5, and the ES4effort has been officially abandoned.

Crockford and I talked about what he disliked about the ES4 proposal, theimportance of code reading as a team activity, and how to move the Web forwarddespite the legacy of existing systems.

Seibel: How did you start programming?

Crockford: I went to San Francisco State University. I went there becausethey had a really good television program. My first year I couldn’t get intothe studio so I looked for other things to take and sort of as a fluke I took aFortran class in the math department. And it turned out I was really good atit so I took the second-semester class.

That was ’71, ’72. It was punch cards in the basement of the library.Timesharing had just come to the school. At San Francisco State we didn’thave a strong engineering department that owned all the computers. Insteadthey got distributed all over the school. Natural sciences had a lab; school ofbusiness had a lab; school of education had a lab; and humanities had a lab.Which was really interesting in that you had all these disciplines all playingwith computers.

I went to work first in the science lab and then in the humanities lab. So I’dhave people coming in who were economists or psychologist orgeographers—they were the most interesting people. I’d learn about theproblems that they were working on and I developed a lot of sensitivityreally early on to the concerns of normal people as they play with theseterrible machines and started looking at how we can make this stuff betterfor them.

Eventually I got into the studios and did all the TV stuff and that was fun butin the end I decided to go the computer way. But all along I spent a lot oftime thinking about the two things together. I anticipated a lot of whatwould become multimedia and now digital media, and at various times in mycareer I’ve gone back and done the media part and then returned to theprogramming part.

Seibel: So you started with Fortran and discovered that you were good atit. Was there anything that drew you to programming other than, “Oh, Iseem to be good at this.”?

Crockford: That’s all it was. It was my first semester, and I had to take amath class and I had picked one of those at random and it happened to haveFortran in it. So I didn’t go into it intending to learn how to program. It wasjust what happened.

Seibel: What was the first interesting program you remember writing?

Crockford: That’s going way back. I think it was a program I wrote todisassemble the runtime of the Fortran system on the timesharing system Iwas using. By doing that, I was able to read how that system worked andtaught myself a lot about programming based on that model, somethingwhich would not ordinarily have been published.

Seibel: What do you think is the biggest change in the way you think aboutprogramming compared to back then?

Crockford: There was a period of maybe a decade where efficiency wasreally, really important. I guess it was in the early microprocessor era whenmemory was still really small and the CPUs were still really slow. We’d getdown into assembly language in order to do things like games and music tomake it fit and to make it fast. Eventually we got over that, so today we’rewriting big applications in JavaScript that run in a browser. It’s such aprofoundly inefficient environment compared to the stuff that we used todo, but Moore’s Law sort of made it all OK.

Seibel: And is there anything that you regret about the path that you tooklearning to program?

Crockford: There are some languages that I was aware of that I never gota chance to use. I’ve read a lot about APL and I understand why it lost, butit was really neat and I never spent any time with it and that wasunfortunate. There are other languages like that, where I’m aware of them,I’ve read what I can about them, but I never got a chance to actually think inthem.


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