Monday, May 24, 2010

Book Review: JavaScript – The Good Parts

image

Today I finished reading JavaScript – The Good Parts written by Douglas Crockford. That picture on his website of him speaking with Chuck Norris on the background should make you run to the local bookstore to buy a copy of his book ;-). I instantly knew after listening to one or two podcasts, where the author appeared as a guest, that his book just had to be good. One can easily notice by the way the author speaks and writes about JavaScript that the author definitely knows his stuff on the subject.

This book is a rather quick read because its only 100 pages long (with appendixes ~145 pages). I started reading this book as a complete rookie when it comes to JavaScript. I must say that I can’t recommend this book as a first book on JavaScript. Don’t get me wrong. I really learned a lot from this book without any foreknowledge  whatsoever. But still, I wish the author had written some sort of a “JavaScript for Beginners” book that could precede “The Good Parts” book in order to get up to speed on all the different parts of the language.

This book is so full of little gems on the JavaScript programming language that I don’t know where to begin. The part of chapter 4 on Functions that describe the four patterns of invocation were a real eye opener and the examples on scope with closures really blew my mind. The chapter on regular expressions is also highly recommended. The only chapter that I didn’t like that much is chapter 8 called Methods. This chapter is completely composed with some kind of API documentation of the Array, Number, Object and RegExp and String objects which I found a bit weird in the book. Also make sure to read through the appendixes where the awful and bad parts are written down as well. These explain the particular language features that are best avoided and why they’re not as good as they look.

Nonetheless, I really enjoyed reading this book and learning about the good and also the bad parts of JavaScript. I think I’m going to read one or two beginner books on JavaScript after which I’m going to give it another thorough read.

Until next time