Tuesday, February 28, 2006

Knowledge Base

The best way to get going with any language is to start with some existing code; tweak it, extend it, rewrite it, and break it. It's good to have some background information for that effort though, which is where Javascript references come in handy.

If you want just the facts without third-party interpretations, go directly to the ECMA 262 (EcmaScript) standard. Like many standards documents, though, it can be very dense for a programmer. ECMA 262 is written as though the reader's job is to implement a Javascript compiler, which means you can count its primary audience using just your fingers. Although ECMA 262 serves as the Supreme Court for correct Javascript behavior, you're better off going to a lower court for intelligible opinions.

By far, my favorite dead-tree book on Javascript is O'Reilly's Javascript: The Definitive Guide. It includes a thorough overview of language features, plus a comprehensive reference section for Javascript functions and objects. Every programmer should have a copy of this book and give it a good looking-to.

Every programmer's dirty little secret today is that Google serves as the primary language reference. That works pretty well for a quick check of the parameters for a particular object, but I do have a few favorite reference sites. The one at W3Schools is pretty comprehensive, but in the process goes into detail about features you'll absolutely never need, like new Boolean(value). The DevGuru guide uses a very different organization but is also relatively comprehensive. However, it also has some errors in the details that I'll cover in future entries.

No comments: