no magic – just tricks

Archive for May, 2007

A long time ago, in the list of “how can I say I’m a web developer if I don’t know this” items, I had determined that JavaScript was my final frontier. A lot of things have happened since then.

Douglas Crockford describes JavaScript as “The World’s Most Misunderstood Programming Language” and “Lisp in C’s Clothing” [source]. Now that I’ve delved more into the depths of JavaScript, I can relate to both these statements. I’ve been introduced to Scheme about a year ago, and have been actively Scheming for the last month or so. Consequently, a lot of the “weird” concepts of JavaScript are just my day-to-day Scheme concepts.

Once you start playing with first-class functions and closures in a language, playing with them in another doesn’t represent a barrier to entry. I might describe this feeling as “coming home”–when all the toys you are familiar with are available for your evil purposes once more.

Most people that I’ve known, including myself, have started their JavaScript journey in the worst possible way. We had heard that JavaScript was not a real language, we had been annoyed by image rollovers and other JavaScript trickeries, and most of the examples out there were spectacularly bad. We copied and pasted our first scripts. We got results and didn’t ask too many questions. In the end, how many of us could claim to be JavaScript experts or even to have known one?

Furthermore, Crockford himself confirmed something that I had suspected: that all JavaScript books were incredibly bad. The only one he could recommend was JavaScript – The Definitive Guide (I only own this book in pocket reference). Hopefully, AJAX and the recent surge of JavaScript interest might convince good authors to step up to the plate.

Recently, I’ve been going through a lot of good material. Here’s what I recommend: