Dirk Bergmann

Developer, panographer. Does consultancy work from own company. Lives in Chiang Mai, Thailand.

Twitter

Chiang Mai

Hua Hin

Thailand Hotels

ListVote - List. Vote. Learn.

Partnerseek - Find Partners

Learning Javascript with Crockford and Spidermonkey

As JavaScript is the language I'm planning to learn more in-depth this year, primarily to approach the latest map-reduce API's of the latests NoSQL databases (CouchDB, riak etc.), I've recently made good progress thanks to two invaluable resources:

#

First, Douglas Crockford's lecture videos at the YUI theater. He has created three separate series, The JavaScript Programming language, Advanced JavaScript. and more recently, Crockford on JavaScript, all available on the same page in the YUI theater. The third episode (Act III) of Crockford on Javascript gives you a tour de force of functional programming and is probably the most valuable of all the videos for advanced programmers.

He also states in his first lecture that there are no good books on JavaScript, except perhaps a single one, JavaScript: The Definitive Guide By David Flannagan. You may also want to check out Crockford's own books which I haven't had the chance to read yet.

Finally, always use Crockford's jslint to check your javascript code quality. It's a great teaching tool in and of itself and will help you find all those missing semi-colons and curly braces.

#

Interactively checking code on the command line is standard practice in the ruby and python universes. Now you can easily have the same code checker at your fingertips with JavaScript. In Ubuntu (8.04 and higher) simply

sudo apt-get install spidermonkey-bin

, and then type

js

to get the beautiful prompt:

js>

Here are some tips for working with the spidermonkey command line. And, to use jslint from the command line, check out this post.