Undergraduate research in a data-mining group was another memorable
experience. “It made computer science
seem like a real, live, interesting field.”
Classes were rewarding in their way,
but solving hard problems made the
experience much more visceral.
Like many figures in programming
languages and libraries, Resig doesn’t
have, or feel the need for, an advanced
degree. His unofficial title is “JavaScript
ninja.”
In many ways, open source
development has been Resig’s laboratory.
“More than anything else, it’s a matter of
becoming involved and actually looking
beyond your own private projects. I
don’t think people realize how much
of an accelerating force open-source
development can be,” he says.
John Query
Additional Q&A With the jQuery Creator
XRDS: jQuery both makes JavaScript faster and more
straightfor ward to write. Are those two ever in contention?
John Resig: API design has come up a lot. At the time I built
jQuery, I was primarily coding in Perl, and Perl is all about
brevity. When I was working on the initial jQuery API, I focused
a lot of brevity, what was the syntactically shortest way to
bind an event, for example. As a result, a brief API arose that
was also incidentally usable.
When I talk with other people about API design, many designers
worry more about clarity than usability. They tend to confuse
those points—if I make it very clear what this is going to do, it’s
going to be usable. But then you end up with Java-style APIs,
factories and factory builders, and worse. I find brevity and
simplicity so much more attractive. Developers enjoy it more.
XRDS: JavaScript is (in)famous for its hybrid functional and
imperative natures. What’s your take on this programming
chimera?
JR: I think it’s great. I hugely enjoy functional programming
and the functional aspects of JavaScript. I don’t think any
serious JavaScript programmer out there is not using the
functional aspects of JavaScript.
The thing that makes JavaScript really great is that it doesn’t
have its head in the functional sand, so to speak. Look at
languages like Haskell. Obviously, you can code with it, but
it’s a completely different world from JavaScript and the
functional programming provided there. I’m especially a
fan of the bizarre prototypal inheritance that you see in
JavaScript. It’s really bizarre when compared to classical
style inheritance, but in the end, it works.
XRDS: What’s next for JavaScript?
JR: At least as a language, JavaScript has a huge future.
I have a hard time seeing a future in which JavaScript is
not still relevant. JavaScript is on the vast majority of all
web sites. Considering how hard it is to just upgrade the
JavaScript language (phenomenally hard), I can’t see a
world in which we are able to transition out of using it. Since
JavaScript is used on virtually every web site, it’s going to be
around forever. Whether we like it or not at this point, we have
the hand we’ve been dealt.