Seibel: I’ve noticed a similar thing with languages—PCs were programmedin assembly because even C was too high-level and only now are we gettingback to languages with some of the power of languages like Smalltalk andLisp that existed when PCs came out. I wonder if programmers are asaware of the relatively short history of our field as they could be, or do wekeep reinventing the wheel?

Crockford: I think we’re tragically unaware of our history, and I’m oftenreally disappointed to see that people who are now practicing this crafthaving no intellectual curiosity about where this stuff came from and justassume that some committee got it right and presented them with a set oftools or languages, and all they have to do is use it properly.

There are amazing stories about where this stuff came from, and whatinfluenced what, and who did what, and what is now considered a mistake,and what should be considered a mistake, but hasn’t yet. I think of myselfsometimes as an archaeologist of software technology and over the yearsI’ve accumulated this collection of underappreciated technology, things that Ithink were really, really good, which are significantly in advance of the stateof the art of what we’re doing now. I keep hoping that we will somehowrediscover this stuff and learn to appreciate it and benefit from having doneit, but it’s a really slow process. I see folks are really entrenched in the waythat things are working right now and it’s really difficult to move.

Seibel: What are some of those technologies?

Crockford: Lisp and Smalltalk, you’ve just mentioned. That’s brilliant stuff,and we’re now finally seeing those ideas being factored into modernlanguages, so we’re doing a lot of work now in JavaScript and trying tomodernize that. It turns out JavaScript already anticipated a bunch of thatstuff; it’s got functions which are lexically scoped and first-class, which wasbrilliant. Now we’re trying to figure out how to get more of the goodnessof Smalltalk and Scheme into this language without breaking it. You couldargue that we’d be better off if we just threw out everything we’re workingon now and go back to Smalltalk and Scheme, and we probably would bebetter off than we are right now, but that doesn’t appear to be an option.

As we’re getting more and more into mash-ups, we want to have code fromall over the place—stuff that we’ll never, ever test with—actually run out inthe field. Which is a new kind of programming. We’ve never done thatbefore. I think that’s the future of programming and we’re getting to it inJavaScript first and it’s working here because the language, in spite of all thestuff it got wrong, got this other stuff right.

Looking at where we’ve come on the timeline of programming, we startedwith machine codes and then we took a leap to symbolic assembly languageand then we took a leap to high-level languages and then we took a leap tostructured programming and then we took a leap to object-orientedprogramming. And each of these leaps takes about a human generation.

We’re overdue on the next one. We’ve been at object for a while. Youcould argue it was Smalltalk-80. You could go back a little bit earlier, butwe’ve been sitting on these ideas for a long time.

I think the next leap, we don’t know what the name of it is yet, but I thinkit’s something related to mash-ups where we can casually take bits ofprogram and put them together and immediately make new programs.We’ve been talking for decades about a model of programming in which wesnapped programs together like LEGO and make stuff. That hasn’t happenedyet. But I think it is starting to happen now and the place it’s happening is inJavaScript, which is the least likely place.

Seibel: When you’re hiring programmers, how do you recognize the goodones?

Crockford: The approach I’ve taken now is to do a code reading. I invitethe candidate to bring in a piece of code he’s really proud of and walk usthrough it.

Seibel: And what are you looking for?

Crockford: I’m looking for quality of presentation. I want to see what hethinks is something he’s proud of. I want to see evidence that in fact he isthe author of the thing that he’s defending. I find that is much more effectivethan asking them to solve puzzles or trivia questions. I see all that kind ofstuff as useless. But how effectively they can communicate, that’s a skill thatI’m hiring for.

Seibel: Do you have any advice for self-taught programmers?

Crockford: Yeah, read a lot. There are good books out there. Find thegood ones and read those. And if you’re doing web development, find thebest sites and look at their code. Although I’m a little reluctant to give thatadvice yet. Most web developers learned to do web development by doing“view source,” and until fairly recently, most of the source that was outthere was very bad. So you had a generation of programmers who wereraised on really bad examples, thinking bad code was the way to write.

That’s getting better now, but there’s still so much bad stuff out there thatI’m reluctant to give that advice yet.

Seibel: What about advice for someone who’s actually getting a C.S.degree who wants to work as a programmer?

Crockford: I would focus on the communication aspect. Learn to write;learn to read.

My advice to everybody is pretty much the same, to read and write. Igenerally don’t hire for specific skills. Until very recently, you couldn’t hiregood JavaScript programmers. They were extremely rare. There are a lot ofreally good ones out there now, but that’s a fairly recent thing. So until thathappened, I would just hire for quality. Are you a good Java programmer, agood C programmer, or whatever? I don’t care. I just want to know thatyou know how to put an algorithm together, you understand datastructures, and you know how to document it. If you can do that, youshould be able to figure out JavaScript.

Seibel: Have you ever had problems with that? People who’ve beensuccessful in one language sometimes have a hard time giving up their oldways, even when working in a new language where they don’t really makesense.

Crockford: I have with, say, Windows programmers. Windows has anumber of very complicated APIs and you can spend years justunderstanding how those APIs work. And that’s pretty much all you do, isyou know that one API. You can write a window handle but there’s notmuch else you can do. I tend not to look for that kind of overspecializationunless I have a really specific niche. Generally, I prefer generalists. I wantsomeone who’s capable of learning any of those APIs but isn’t necessarilyskilled in any one.

Seibel: You said earlier that you got into computers because you thoughtthey would make the world a better place.

Crockford: That’s my intention.

Seibel: How’s that working out?

Crockford: For the most part, we’ve done pretty good. I think the world isa better place, although it’s not always moving forward. Looking at, say,international politics over the last ten years, the consolidation of big mediaand the corrupting effects of that have not been compensated for by theopen network. That’s a big disappointment.

Hundreds of thousands of people have died as a direct consequence of that.That’s really sad. I would like for the network to be doing a better job sothat kind of stuff doesn’t happen again. It’s not clear yet whattransformations to the network have to occur in order to accomplish that.And maybe it’ll be fine on its own, but I’m more pessimistic. I think we needto figure out the next leap in order to overcome whatever is not workingnow.

Seibel: Wouldn’t the gazillion bloggers out there say, “Hey, we’re out hereblogging about everything and the mainstream media is taking it in thepants.”


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