Video icon 64
Learning to code? Skill up faster with our practical video courses. Start your free trial today.
Advertisement

Master Developers: John Resig

by
Student iconAre you a student? Get a yearly Tuts+ subscription for $45 →
This post is part of a series called Master Developers.
Master Developers: Addy Osmani
Master Developers: Dave Methvin (jQuery Core Team Lead)

He brought us jQuery, the most widely used JavaScript library on the planet. Then he brought us Processing.js, a JavaScript port of the popular data visualization programming language. Now, John Resig is on a mission to revamp the way people learn programming as the Dean of Computer Science for Khan Academy. The man never stops (does he even sleep?) giving back to the community, and after being out of the public eye for some time, I caught up with him to find out what he's been up to.


Q You've taken a hiatus from the limelight. Where ya been?

Around :) But more seriously, I decided to spend more time doing application and server-side development — something that I didn't spend much time on when I was working on jQuery full-time.


Q You're still involved in the jQuery project but have turned over day-to-day core team leadership to Dave Methvin. What prompted that?

I was spending less time on the day-to-day bug fixing of jQuery and wanted to make sure that the project was going to be in good hands as I started to work on other things. They've been doing an excellent job of keeping the library in great shape. It's in good hands!


Q Khan Academy seems to have become a bit of a passion for you. What's your role there?

Khan Academy

I've been working on a number of different projects. I created the framework that we use for building exercises (available on Github https://github.com/khan/khan-exercises), helped build the Khan Academy iPad application, created the Computer Science platform, and am now working on internationalizing the site, making it available in many languages to people all over the world.


Q How do you think Khan Academy is making a difference, specifically when it comes to the computer science curriculum you're building? Who is it targeting and how are you reaching out to that audience?

I decided to spend more time doing application and server-side development.

I'm really excited by the work that we're doing at Khan Academy. We've been working to find ways of teaching the basics of programming to those that've never programmed before. Additionally we're finding ways of integrating Computer Science education with our existing math and science curriculum—tying all the pieces together.

This makes a lot of sense and provides a cohesive way of learning that other programming platforms don't have. Understanding algrebra is an important prerequisite to understanding variables, for example. Understanding trigonometry is important for doing graphics work. Combining all of this together makes a lot of sense. At least right now, we're primarily targeting our existing K-12 audience. Thus far we've had about 2.9m users of the platform since we launched it in August 2012.


Q Where do you see the balance being struck between the traditional education system and Khan Academy (i.e. how can they work together to better education)?

I'm really excited by the work that we're doing at Khan Academy.

At least at the moment, Khan Academy is primarily targeting material that is more geared towards people of a younger age (pre-college). Many students use the material as a supplement to their existing work—or even as part of a class (depending upon the school). We've seen some great results from schools that use Khan Academy as part of their curriculum, getting students to use the material in class and consuming both the videos and exercises at their own pace. In this way, Khan Academy is actually very different from many of the other education solutions out there (not focusing on college courses, for example) and is filling an incredibly valuable niche.


Q The initial CS curriculum you're building is focused on teaching programming principles using the JavaScript language (which seems obvious). Where do you plan on taking it in the future?

We use JavaScript and Processing.js and a real-time programming environment to give students an easy way to get started and interact with the code. We've recently been finding ways to get students to collaborate on each other's work. When we launched, we included the ability for students to "fork" each other's code. We've added in some ways to make these forks easily discoverable which has resulted in a number of students building off of each other's work. It's fascinating to see it in progress!


Q I remember you mentioning that you're doing quite a bit of work around internationalization. Is that for Khan? Has it been challenging/rewarding? What are the hurdles you've encountered?

I've been working on i18n for two projects: one is a side project and the other is the Khan Academy site. It's been quite challenging; we have a large site with many pieces of original content that need translating. Getting all the moving pieces organized and given some semblance of order is definitely quite tricky. Thankfully, there are a lot of tools that already help with this stuff (for example we're using the Jed.js library to do some pluralization work on the client-side).


Q jQuery has become the most widely used JavaScript library on the Internet. How does that feel?

Pretty awesome! It's so great to see so many people getting benefit out of using it. It's amazing that even with new browsers and APIs, we're still not at the point of having a completely seemless cross-browser development experience. It's getting closer, and jQuery absolutely helps with that, but I'm looking forward to the day in which we have a truly unified, easy-to-use, development API.


Q I'm going to ask you the same question I asked Dave. There's been a bit of sniping at jQuery lately to the point where some in the community look down at developers that use the library. What's your take on this?

Oh, there's always sniping. I think there's a tendency for people to see poorly-written code as representative of all code written with a library or language, and that's obviously just not so.

An especially tricky issue is that since jQuery usage is so ubiquitous, it means that nearly everyone is using it in some way — including people who don't know how to program at all and just copy-paste code together without caring how it works. The best way we can combat this is to try and provide better educational materials to those wanting to become better programmers, like the new jQuery Learning Center


Q JavaScript development has evolved quite a bit since you first released jQuery. What are the things that you wish you would've had when you first kicked off the project?

Oh, the Selectors API, absolutely (the Selectors API is what gives us querySelectorAll and allows us to query for DOM nodes using CSS selectors). Amusingly, the fact that jQuery popularized the usage of CSS selectors to find DOM nodes is what encouraged its standardization to begin with. It's a chicken-and-egg situation :)


Q Along those lines, what are the trends in front-end development that you're seeing and would recommend developers to keep an eye on?

As someone who writes a lot of JavaScript, I've been spending more time with Node.js and PhantomJS. These environments give you the ability to write JavaScript on the server-side and do all sorts of scripting and application authoring. It's really fun to be able to write JavaScript and have it work on both the client and server (for example, being able to share logic for a client-server game).


We've seen some great results from schools that use Khan Academy as part of their curriculum.

Q You've been fairly vocal about the shifts in the browser space. What's your take on the current state of browsers and the competition between them?

I think the biggest thing to happen to browsers in the past few years is the shift to a rapid release cycle, championed by the Chrome team and then taken up by the Firefox team. Having releases that come out every three months instead of every year (or every other year) completely changes how new features are introduced and used by developers. Any browser that wishes to remain competitive is going to have to keep up with this breakneck development schedule; otherwise, they'll surely lag behind.


Q Karen McGrane recently stated at a conference that 31% of American internet users only use mobile for Internet access. What are your thoughts on the current state of mobile browsers, especially when it comes to delivering educational materials for Khan?

Increasing we access for more people (and with a good browser!) is really a victory for all. We haven't been targeting this explicitly at Khan Academy, but there's an awesome project called KA Lite which is attempting to make this happen.


Q Several years ago, we talked about the concept of directly including JavaScript libraries into the browser to improve performance (similar to primed caches). Do you still think that's something to be considered?

I still think it's possible, but it's hard to say how much benefit there would be from doing that. If the code was already pre-compiled into bytecode and was just waiting in memory, then I'd imagine there would be some nice speed-ups. That being said, I bet that the speed-ups would be less than those provided by performance improvements to the DOM overall.


Q Your book, Secrets of the JavaScript Ninja, is finally out after four years! Tell us about that journey and if you think the book is still relevant four years on.

Secrets of the JS Ninja

It certainly has been a journey! I wrote the bulk of the content over 2008-2010, and my co-author, Bear Bibeault, has worked on it over 2011-2012. I think it's still exceptionally relevant to modern development.

The first half of the book covers best practices and some of the trickier aspects of modern JavaScript development. The second half covers the DOM and everything you need to know in order to write cross-browser code. These two topics are still an ever-present part of JavaScript development today and should help everyone from intermediate to advanced developers.


Q Would you ever write a book again?

Probably not! At least not a traditional printed book. I'm keen to do more blogging and article writing. If I ever do write another book, it'll definitely be self-published and likely in ebook-only form.


Q You're now living in New York. Are you seeing any differences in the developer community between Boston and NYC?

I'm loving New York. I've been meeting a wide range of developers here, and I've been surprised at how strong the community is here with tons of meetups, lectures, hack-a-thons, and other events going on. While I've only been here for a short time, it feels like that community is only growing stronger.


Having releases that come out every three months instead of every year completely changes how new features are introduced and used by developers.

Q On a personal level, you've taken up a new hobby. Want to tell us about that?

Sure thing! I've been spending more time exploring art and have become fascinated with one art form in particular: Japanese Woodblock Printing. This was an art form in Japan that was popularized from the early 1700s until the late 1800s (and continuing on into the present day, although as a niche).

The prints depict the incredible world of samurai, warlods, gods, beauties, and nature. They're extremely vivid and look surprisingly modern. I've been putting my programming skills to use and have developed a tool for researchers that aggregates prints from a number of museums around the world and makes them image searchable: http://ukiyo-e.org/ I've been getting a very positive response from a number of scholars, which has been most rewarding.

Advertisement