Skip to content

Instantly share code, notes, and snippets.

@mkmcdonald
Created October 8, 2012 15:51
Show Gist options
  • Save mkmcdonald/3853216 to your computer and use it in GitHub Desktop.
Save mkmcdonald/3853216 to your computer and use it in GitHub Desktop.
Learning JavaScript
On 08/10/12 09:35, I Am Here wrote:
> Can someone recommend me a good book which will cover ALL important
> features of [JavaScript]?
There is no book that adequately covers JavaScript. Douglas
Crockford’s *JavaScript: The Good Parts* contains a moderately high
level of technical depth, but is quite brief.
David Flanagan’s *JavaScript: The Definitive Guide* is at best a
mediocre physical manifestation of Mozilla’s Developer Network and
at worst a complete waste of time (which is my opinion).
Those are the two major JavaScript books that I have read and—in the
case of the latter book, unfortunately—purchased. I own another, but
its quality is so dubious that I will not cite it. Other authors such as
Danny Goodman have attempted to cover JavaScript at length. A
perusal of the c.l.j. archives will evince that heavy scepticism is
advised whilst reading his work.
> I already have 3, but NONE of them, as I discovered to my downfall
> recently, covered for example, hashes, or how they are treated as
> objects. I don't wish to go on my expertise alone, as it's failed
> me - I want some experts to recommend a book which will cover
> everything.
If there is a book that covers *everything* on a specific topic, I
would like to know of it. Of course, that is likely to be impossible.
Because topics—and therefore, technologies—evolve, one
comprehensive effort can quickly become outdated. Donald Knuth has
been writing the *The Art of Computer Programming* series for decades,
and some portions are already considered by some as outdated.
Of the JavaScript books that I have read, zero have covered the DOM
in sufficient detail. That book still needs to be written.
Consequently I advise the following options:
1. Read the previously cited c.l.j. FAQ. It covers a wide variety of
topics, including HTML, CSS, and the DOM API.
2. Read both the ECMA-262 3rd (ES3)[0] and 5th (ES5)[1] edition
specifications. The ES3 specification will equip you with knowledge
that is relevant to older environments that implement it (or in the
case of *M*icro*S*oft *I*nternet *E*xplorer, something similar to it),
whereas the ES5 specification is relevant to modern browsers. I suggest
that the former specification be read before the latter. Both are
available—and are cited—in HTML format.
3. Read material on the DOM API. I recommend starting with a DOM 0
reference[2]. Once a base of knowledge has been established, ascend
the DOM ladder (with each level denoting a “rung”). The DOM Core
specifications are intended to cover multiple document types, whereas
the DOM HTML specifications are intended to cover HTML documents.
4. Research the `window` object. The W3C has provided a draft[3] for
it; and it is also covered in the HTML 5 specification[4].
5. Experiment with this knowledge by testing it in various browsers.
Mozilla[5], Microsoft[6], Opera[7], Apple[8], and Google[9] have all
documented implementation-specific behaviour to some degree.
[0]: http://bclary.com/2004/11/07/
[1]: http://ecma-international.org/ecma-262/5.1/
[2]: http://docs.oracle.com/cd/E19957-01/816-6408-10/
[3]: http://www.w3.org/TR/Window/
[4]: http://www.whatwg.org/specs/web-apps/current-work/
multipage/browsers.html#the-window-object
[5]: https://developer.mozilla.org
[6]: http://msdn.microsoft.com/en-us/library/ms533050%28v=VS.85%29.aspx
[7]: http://dev.opera.com/
[8]: https://developer.apple.com/devcenter/safari/index.action
[9]: http://www.chromium.org/developers
--
“The theologian Meric Casaubon argued—in his 1668 book, *Of Credulity
and Incredulity*—that witches must exist because, after all, everyone
believes in them. Anything that a large number of people believe must
be true.”—Carl Sagan—*The Demon-Haunted World*.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment