
What to Read to Get Up to Speed in JavaScript - stsmytherie
http://blog.reybango.com/2010/12/15/what-to-read-to-get-up-to-speed-in-javascript/
======
tlrobinson
My recommendations:

Videos:

* YUI Theater talks by Douglas Crockford: <http://developer.yahoo.com/yui/theater/> especially:

* The JavaScript Programming Language

* Advanced JavaScript

Websites:

* "A Re-introduction to JavaScript": [https://developer.mozilla.org/en/a_re-introduction_to_javasc...](https://developer.mozilla.org/en/a_re-introduction_to_javascript)

* Advanced tutorial from John Resig: <http://ejohn.org/apps/learn/>

* MDC Reference: <https://developer.mozilla.org/en/javascript>

Books (you can borrow my copies of these if you want):

* "JavaScript: The Good Parts"

* "JavaScript: The Definitive Guide" is a good reference for both the language and browser/DOM APIs

~~~
InclinedPlane
I find The Definitive Guide is completely unnecessary with access to the
internet.

~~~
tlrobinson
It's not just a reference, the first portion of the book is good overview of
the language and browser APIs.

~~~
scorpioxy
I agree.

Plus, the book was available before we had all the different resources on the
web. I read a few years and rarely refer to it anymore but I especially liked
the parts on browser inconsistencies.(my edition is dated now, but served its
purpose at the time i bought it)

------
sedachv
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...](http://carcaddar.blogspot.com/2010/07/book-review-nicholas-c-
zakas-high.html))

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).

~~~
jmulho
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.

~~~
pronik
<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.

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

[http://groups.google.com/group/comp.lang.javascript/msg/37cb...](http://groups.google.com/group/comp.lang.javascript/msg/37cb11852d7ca75c?hl=en&);

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.

------
kls
_What if I had to Choose Just 3 Books_

You selection is good but I can't believe that in the "if I could only get
three" section, Crockford's the good parts is not #1. I mean it is the seminal
work for JavaScript, it should be the first or second book anyone considering
doing serious JavaScript should read.

~~~
simonsarris
I must echo this sentiment and also mention a few non-books that were
instrumental for me.

For my new job (first out of college) I have read ~5 javascript books cover to
cover and flipped through a few more.

Crockford's book was _by far_ the most enlightening and made the most
immediate impact on my understanding and methods of coding.

Second, for me, was John Resig's blog (<http://ejohn.org/blog>)

And third I suppose might be looking through the way people have written
things on github:

<https://github.com/nzakas>

<https://github.com/jquery/jquery>

~~~
mitjak
I will echo your echo, along with a JavaScript tutorial by Resig which I rate
at least as highly as The Good Parts: <http://ejohn.org/apps/learn/>

------
vladd
Try to separate the JavaScript language from the additional bindings that the
platform gives to you.

If you learn client-side JavaScript for use inside the browsers, differentiate
what's a language feature and what's part of the DOM.

If you learn server-side JavaScript, start by looking over the CommonJS
standards as they tend to be the common denominator across the server-side JS
implementations.

And... experiment. Write a .html on your desktop which references a sample.js
and use your browser to check it out and modify the code. Don't rely on
technical knowledge for more than a couple of hours without trying out the
things in practice. Or, for server-side JavaScript, you can get a free hosting
account and browser-based editor at <http://erbix.com> (+), using just OpenId
(i.e. your Google account) to sign up.

(+) Disclaimer: I'm affiliated with Erbix.

------
petercooper
Not a book and not a blog, but if you want to keep up with the latest
JavaScript stuff on a weekly basis through e-mail:
<http://javascriptweekly.com/>

Yes, it's mine but it's had kudos from folks like Steve Souders and Amy Hoy
and almost at 3000 subscribers so I don't feel too bad pimping it. Latest
issue is at <http://javascriptweekly.com/archive/5.html> if you want a
preview.

------
gte910h
Eh, in my opinion, unless you're doing server side javascript, the thing you
need to learn most about when doing javascript is dhtml. The actual javascript
language isn't the hard or strange part of the experince.

Most of his links seem to point to actual language esoterica. Only 1 seems to
really point at DOM interactions.

~~~
afshin
I think people coming from most other languages that have objects get very
confused about prototypal inheritance. The significance of first-class
functions is also not obvious to people who don't come from a functional
programming background.

I think you're right insofar as it's easy to "get going" with JS and see
things happen in a web page. But if you're looking to actually learn how to
build non-trivial apps, a solid grounding in the language is pretty key.

~~~
gte910h
9 books worth of grounding?

I think one beginner and one advanced book _maybe_. True, I did come from a
different background than most (having learned both those features in other
languages before ever doing javascript), but do you really need 7 more books
to tell you about it?

I think the post is bordering on book affiliate spam.

~~~
afshin
I don't disagree with you on that point. Two books should be plenty. I'm only
pointing out that there's a lot of utility in learning about JS as a
programming language, completely divorced from DOM stuff.

------
DanielBMarkham
Shorter list from hn-books: [http://www.hn-
books.com#B0=41&B1=14&B2=89&B3=119...](http://www.hn-
books.com#B0=41&B1=14&B2=89&B3=119&B4=10&B5=97&B6=96&B7=30&BC=8&E0=1&EC=1&FC=0&QC=0&Name=Daniel)

Note that I included a JQuery book in there. Any more, it's not enough to know
just Javascript, you should also know JQuery (and just as importantly you
should know when to use it and when not to use it)

These are ordered, so the top 3 are the best (in my opinion). The others are
really good, but with a topic like this it can easily spin out of control,
with hundreds of books getting recommended. Stick to 2-4.

------
p0nce
"Javascript : The Good Parts" + visit <http://ejohn.org/apps/learn>

------
AgentConundrum
I wish there were more posts like this, explaining which books are suitable
for each "knowledge level."

My biggest issue has always been that most books assume you know nothing about
programming, and so become boring and repetitive, and I learn nothing new.

------
Tichy
What about server side JavaScript? I guess there are no books yet?

~~~
code_duck
I can't locate any. But as far as the language basics, they're the same, of
course so Crockford's various works should go a long way.

