JavaScript has “Good Parts”!? Yes, it does.

I used to loathe JavaScript. It was a language that looked ugly, had no obvious structure, and seemed like a toy that web developers would use. Then I read “JavaScript: The Good Parts” by Douglas Crockford and my viewpoint changed for the better. I’ve now seen that JavaScript can still be the hopeless mess that I just described, but it can also be something “beautiful” if done with care.

Crockford is the JavaScript architect over at Yahoo! and he is a man who clearly knows his stuff. Over the span of 153 pages, he explains many of the finer points of the popular web language.

His book is quick to illustrate that there are some very bad parts in JavaScript, and he is not afraid to call out “mistakes” in the design of the language. I found this honesty to be very refreshing. I’ve read numerous language books that will want to highlight every feature of a programming language, but not point out which parts were a bad idea. Instead, those books will let you discover yourself, on your own projects, what are bad ideas and what are good ideas. To admit that a language has problems and point out features that should absolutely not be used is great. It means that I get to learn less to be more productive and, in this case, benefit from the wisdom and experience of someone who has been working with JavaScript for years.

Overall, the book is excellent. It’s definitely not light reading and if you choose to read it, it will require your careful attention to grasp the subtle points. However, the time spent trying to understand the material will be a boon to any serious web developer who has to write more than a few lines of JavaScript. And since so much of the web uses JavaScript to create dynamic pages, I think all web developers should know this stuff.