Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That list is way too long. JavaScript isn't that big or complicated, even if you include DOM and cross-browser issues (which by virtue of continuous browser changes, you will never learn about from a book).

My top 3: 1. Eloquent JavaScript 2. JavaScript the Good Parts 3. High Performance JavaScript (see my review: http://carcaddar.blogspot.com/2010/07/book-review-nicholas-c...)

Also, I wouldn't recommend either of Resig's books, despite not reading them. Look at Peter Michaux and David Mark's posts on comp.lang.javascript for criticisms (actually, comp.lang.javascript would be the fourth thing on my list if it was a book).



The posts about Resig that I can see by Peter Michaux and David Mark seem to be mostly empty of content and filled with petty namecalling. Do you have any specific review/critique that you think is helpful?

For what it’s worth, Secrets of the JS Ninjas is one of the most illuminating JavaScript resources I’ve seen anywhere – I don’t know anyone who wasn’t able to learn something from reading it, including skilled, seasoned JS developers, and several of its insights can’t be found anywhere else so far as I know – and it’s at this point still a half-written draft.


I can't find the criticisms of Resig's you mention. Can you provide a link?

I did find an encyclopedia's worth of ranting.

Conclusion: don't read Resig's books because two guys who spend a lot of time hating jQuery have criticised the books harshly somewhere on a gigantic website about javascript.

I don't buy that argument. Links please.


http://michaux.ca/

http://www.cinsoft.net/mylib.html

Both are experts on JavaScript and while David Mark is controversial, Peter Michaux is not. If he is hating jQuery (and he is not the only one, about 75% of that JSMentors list considers jQuery bad), that must be for a reason. Google for "browser sniffing" vs. "feature detection" to make your own opinion.


Here's David's c.l.j post that caused a lot of controversy:

http://groups.google.com/group/comp.lang.javascript/msg/37cb...;

If you want to see other criticisms for them, search c.l.j archives on Google Groups (I admit it's not easy ever since Google ruined Groups search).

The thing with jQuery is it's not as simple as "I hate jQuery." The basic idea behind jQuery (selectors) is a great way of doing stream processing over the DOM. This is a really convenient way of working with existing HTML pages.

The main reason David Mark dislikes jQuery is that (at least at the time) it was poorly implemented. Before I ever came across his posts, I tried reading jQuery code and thought it was very hard to understand, but bought the conventional wisdom excuse that JavaScript programming was special because of cross-browser hacks and people like Resig were "ninjas." Then I came across Michaux's code, read Mark's posts, and realized that the "JavaScript ninjas" were really just writing bad code.

But that doesn't change the fact that jQuery is very convenient to use for manipulating existing HTML pages. But there's another problem there - jQuery does stream processing eagerly at run-time. This is extremely inefficient, and there's no reason to do it for pages where you have control over HTML.

A lot of work has gone into caching in jQuery to avoid duplicated selector search, by far the biggest overhead (conceptually, you're doing an exhaustive search over the entire DOM every time you execute a selector).

But that still doesn't address the fact that the results of the selectors are produced eagerly, and processed by every operator eagerly. There are two optimizations that can be made here: map fusion and lazy evaluation. The latter is possible, but would require rewriting jQuery and changing its interface. The former is impossible without a preprocessing step.

But like I said, there's really no reason to even bother using jQuery with pages where you have control over your HTML and can put the objects you need into arrays and hash tables to be there when you need them. That, and the move of web applications to canvas (at this point I'm convinced it's inevitable) make jQuery irrelevant at this point in time IMO.


Those links go nowhere relevant.


Eloquent JavaScript has a print version coming out as well: http://nostarch.com/ejs.htm


For completeness, here is the interactive version: http://eloquentjavascript.net/contents.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: