HNHacker News
TopNewBestAskShowJobs

jeresig

3,006 karma · joined October 10, 2006

I'm John Resig, the creator and lead developer of the jQuery JavaScript Library.

I work at Khan Academy and the author of the books 'Pro JavaScript Techniques' and 'Secrets of the JavaScript Ninja'. I'm currently located in the Hudson Valley, NY.

I was in Y Combinator-funded startup during the summer of 2006 with Julia West ('juliamae') and Josh King ('skierx') working on peer-to-peer messaging over mobile devices.

Site: https://johnresig.com Email: jeresig at gmail.com

submissionscomments
jeresig··on John Resig's ‘Secrets of the JavaScript Ninja’ has been released
Sorry for the delay in announcing it - I was waiting for the book to physically arrive in my hands, which it hasn't done so, yet. (I have a copy pre-ordered with Amazon and since that's the way most people will be receiving the acquiring the book, I imagine, I wanted to make sure it was actually, physically, being distributed before I announced it.)

I plan on writing up a full blog post once I have my copy of the book.

jeresig··on Khan Academy: Computer Science
Awesome - glad you're enjoying it! One thing to note: If you make changes to the code and then hit play again right now the user's changes are lost (making sure that playback will continue to work). We definitely want to persist those changes in some way, automatically, although in the worst case the user can always make some changes and hit 'Save' and they'll be saved to their own account.
jeresig··on John Resig: Redefining the Introduction to Computer Science at Khan Academy
In our experience thus far we've found that students are far less intimidated by the numbers/math when they're able to directly manipulate the results. When they can tweak the numbers with minimal ramifications and instantaneous feedback they can easily intuit what the numbers are attempting to do. Working with young kids we definitely found that they were comfortable in this environment even after minimal introduction.
jeresig··on John Resig: Redefining the Introduction to Computer Science at Khan Academy
They are narrated by Jessica Liu (as mentioned in the blog post).
jeresig··on Khan Academy: Computer Science
I disagree. We're working towards the goal of having a comprehensive Computer Science curriculum and this is just the first step. I talk more about our reasoning and methodology here: http://ejohn.org/blog/introducing-khan-cs/
jeresig··on Khan Academy: Computer Science
They're narrated by Jessica Liu, more details here: http://ejohn.org/blog/introducing-khan-cs/
jeresig··on John Resig: Secrets of the JavaScript Ninja Update
I wish I could say that I haven't been personally attacked by them, unfortunately it has been rather extensive and ongoing. Thankfully I've been able to avoid most of it by not visiting clj since 2008-ish and blocking choice Twitter users. Sometimes is trickles back up to me from people letting me know what's going on.

I'm 100% fine with code criticism - I think you'll find no JS library more open to it than the jQuery project, we've shifted the code base many times over the years making large quality/performance/API improvements based upon criticism. That being said I have no interest in talking with people - valid code criticism or not - if they're personally attacking me as well.

jeresig··on John Resig: Secrets of the JavaScript Ninja Update
Interestingly, jQuery was the first major library to switch to a feature detection model. Looking around it appears that a number of other libraries still use browser sniffing (such as MooTools, Prototype, and Dojo). The reason why I switched jQuery over to that model is largely due to my personal research into the matter during the process of writing Secrets of the JavaScript Ninja (largely as a desire to future-proof jQuery against upcoming bug fixes by major browsers).

It's rather amusing to see a case where I, unfortunately, fed the trolls trotted out as an example of future decision making. In this case the decision behind this was my own and largely done through my personal examination of the jQuery code base.

jeresig··on John Resig: Secrets of the JavaScript Ninja Update
I think that post has less to do with my opinions of feature testing and more to do with the environment presented by that usergroup.

As to why jQuery moved to feature testing, we discussed that in the jQuery 1.3 release notes: http://docs.jquery.com/Release:jQuery_1.3

jeresig··on John Resig: Secrets of the JavaScript Ninja Update
Every where you see the "with statements are harmful"/"eval is harmful" drum being hit, you see Douglas Crockford. He's a great guy, and I really respect his opinion, but I continue to feel that these are legitimately useful aspects of the JavaScript language -- especially if we want to consider JavaScript as the "assembly language" upon which other languages are built.

For with statements in particular, templating and scoped evaluation (I provide an example from the Firebug console in the book) are probably the two areas in which I've seen it most successfully used.

For code evaluation I only have to direct you to the creation of Coffeescript (an entirely evaluated language) whose innovations have directly influenced new versions of the ECMAScript language.

They have their place and when used sparingly, but effectively, the can be formidable parts of a web developer's arsenal.

jeresig··on Lincoln Assassination Eyewitness on 1956 Episode of I’ve Got a Secret
Sounds sort of like StoryCorps: http://storycorps.org/
jeresig··on New Khan Academy Exercise Framework Is Live
That may be a bug with that particular problem - you should click the "Report a Problem" link at the bottom of the exercise and copy-and-paste what you just aid here, there. At best the problem isn't being clear that it's looking for a reduced form - at worst we should be trying to exclude other possibly valid answers. Thanks!
jeresig··on New Khan Academy Exercise Framework Is Live
Heh yeah, the Mathjax API is rather awful. Tons of separate file requests, configuration is only designed to work in inline script tags, and other ugliness. We've been experimenting with MathQuill - it's way faster and much more lightweight. Unfortunately it doesn't have all the features that we need otherwise we'd switch right away.

http://laughinghan.github.com/mathquill/

jeresig··on John Resig uses this
I have yet to see it work - at least my Hip Chat tab doesn't update when a new chat comes in, whereas it does in Firefox.
jeresig··on John Resig uses this
I was looking at it just recently - it looks promising. Haven't had a chance to try it, yet.

http://sickbeard.com/

jeresig··on John Resig uses this
Yes. Although I was just reading through the extension docs and realized that you do have permission to add context menu items: http://code.google.com/chrome/extensions/contextMenus.html

So yeah, strike the last item from my list - I blame it solely on PasswordMaker.

jeresig··on John Resig uses this
Off the top of my head, three things that've bugged me:

I use a ton of tabs in my browser, in Firefox the tabs go off to the side and allow me to scroll through them (while still allowing me to read the title) whereas Chrome squishes the tabs into tiny micro-sized pills that are completely unreadable.

Additionally I use App Tabs in both browsers - but only in Firefox does it highlight when I've received an update (such as a message in Hip Chat or an email in Gmail).

The lack of integrated extensions in Chrome makes for a weaker overall experience. I use PasswordMaker to manage my passwords - works great in Firefox, can enter passwords into any field, but in Chrome it frequently doesn't detect a password field - and since it doesn't have context menu access I can't fill in my password. I end up having to open up Firefox just to get to my password.

So yeah, I still use Firefox for daily browsing, and Chrome for dev.

jeresig··on John Resig uses this
Very interesting, I'll have to check into that! I use a Griffin FM transmitter right now, works OK, but has frequent problems with competing radio stations.

http://www.overstock.com/Electronics/Griffin-RoadTrip-iPhone...

jeresig··on JQuery 1.6.2 syntax error? You may be the victim of SEO.
Naturally, we're talking with our legal representation about that - we'll have to see what we can actually do. I think we're "ok" for now though as users are getting to the right place in the end.
jeresig··on JQuery 1.6.2 syntax error? You may be the victim of SEO.
Hi Pierre -

Thanks for the details on this! We dug into our Wordpress and realized that W3 Total Cache was configured to block anything that had the word 'bot' as part of its user agent string (sigh). That's now fixed and live.

As to the redirect - that's actually a bit of devious magic on our end. Since jquery.it is hotlinking to our JavaScript and CSS we just added a bit of JavaScript to automatically redirect them to the right jQuery.com page:

    if ( /jquery\.it/.test( window.location.hostname ) ) {
       window.location = window.location.href.replace('y.it', 'y.com'); 
    }
Thanks again for your pointers - looks like the jQuery 1.6.2 blog post is already showing up in the search results and jQuery.it is not in the first page of results (although "jquery 1.6.1" hasn't updated yet and jQuery.it is still there - I assume that it'll be remedied as the Google spider makes more progress). Thanks again!
jeresig··on jQuery "Genealogy" plugin
Hilarious - nice job Ben! I was bemusing in the Khan Academy chat the other day that I always thought it'd be hilarious (although, useful) to have a .uncle() or .aunt() method (for getting .parent().siblings()). Quite amused that Ben put the effort into making this happen.
jeresig··on JQuery 1.6.1 released...
I started to write a reply to some of the comments here but ended up turning it into a blog post: http://ejohn.org/blog/jquery-16-and-attr/

Looks like someone has submitted it to HN as well: http://news.ycombinator.com/item?id=2544698

jeresig··on JQuery 1.6.1 released...
Actually == true and == false will still work, === true and === false will fail (as the return value is now "disabled" or undefined).
jeresig··on JQuery 1.6.1 Released - More changes to attr() for some booleans
You probably wouldn't, it's just a convenience method (and patches over some of the cross-browser inconsistencies and naming-convention weirdness).
jeresig··on JQuery 1.6 released
Let's pretend we're working with a checkbox that isn't checked at all:

    <input type="checkbox" id="c"/>

    $("#c").attr("checked") => false     // 1.5.2
    $("#c").attr("checked") => undefined // 1.6
    $("#c").attr("checked") => undefined // 1.6.1
The user then checks the checkbox OR we set the check by doing .prop("checked", true) OR we set the check by doing [0].checked = true, the result would be:

    $("#c").attr("checked") => true      // 1.5.2
    $("#c").attr("checked") => undefined // 1.6
    $("#c").attr("checked") => "checked" // 1.6.1
Note that if we had done .attr("checked", "checked") OR .attr("checked", true) to set the checked property then .attr("checked") would've returned "checked" in both 1.6 and 1.6.1.

In short: In jQuery 1.6.1 .attr(BooleanAttribute) now returns either the name of the attribute (if true) or undefined (if false). Which is consistent with the rest of the API and with the DOM itself.

I should note that all of this is a moot point if you're using .prop("checked") - that will just return true/false consistently based upon the current checked state of the checkbox.

jeresig··on JQuery 1.6 released
I thought about this discussion a lot more today, discussed the points with the rest of the jQuery core team, and we decided to land an improvement to bring back the boolean attribute handling (with virtually no performance overhead).

The bug and commit are as follows: http://bugs.jquery.com/ticket/9079 https://github.com/jquery/jquery/commit/a9d9f8c5422f171d9c45...

You can start using this code right now with the following version of jQuery: http://code.jquery.com/jquery-git.js

Hope this helps!

jeresig··on John Resig joins the Khan Academy
Roughly right. I told them that I really wanted to build a cross platform, mobile, version of their application (amongst other things, naturally). They mentioned that they were already looking to build an iPad application - that seems like a fine place to start development and testing.

It's going to be a challenge to figure out the right UI idioms for the project, less so getting it working on a bunch of platforms giving the technology stack (open web technologies). Right now that's my biggest concern. Once we figure out how the interactions should work then the table/mobile world is our oyster.

jeresig··on John Resig joins the Khan Academy
As I replied a few minutes ago - it absolutely will be a cross platform application using web technologies. It remains to be seen how it'll be bundled (likely using PhoneGap, I suspect) so at that point most of the major platforms are feasible.
jeresig··on John Resig joins the Khan Academy
"Hopefully the iPad is just a kickoff point."

That's precisely it. Being who I am, I'm going to be building everything with Open Web technologies and most likely built on top of jQuery Mobile. The iPad is just serving as a good initial platform to target and test on before expanding massively.

I wouldn't be surprised if much of the work that happens on the tablet version of the site gets back-ported to the main site itself (as things like tablets and mobile devices tend to encourage minimalist UIs and a larger emphasis on what the user is attempting to achieve).

I did work for the One Laptop Per Child project in the past, I'm a strong advocate for getting useful resources out to as many people as possible - regardless of their means.

jeresig··on JQuery 1.6 released
The issue has been fixed and integrated into the current build of jQuery: http://code.jquery.com/jquery-git.js

We're going to have a 1.6.1 release within the week. Thank you for your bug report!

← PreviousPage 4 of 11Next →