Javascript: The Good Parts
Who Wrote It?
When I first heard Douglas Crockford was writing Javascript: The Good Parts (let’s just call it JTGP from here on out) I was anxiously awaiting the release. Crockford has been responsible for many highly regarded articles and presentations, as well as for his incredible work with JSON, JSLint and much more. While Brendan Eich may be the father of Javascript, Crockford is probably the Godfather. Even Eich himself called Crockford “the Yoda of Lambda JavaScript programming.”
What’s Covered?
JTGP does as promised…it brings to attention the best parts of the Javascript language. Topics like Objects, Inheritance, Arrays, Functions and Regular expressions are discussed throughout the book. While focusing on the “good parts” of Javascript, Crockford also points out the not-so good parts and explains why these other parts don’t fall into the good category by pointing out caveats and pitfalls.
I’ve seen it mentioned before that people complained about the book being a bit short. It weighs in at a very light 145 pages, 45 of which are appendixes. The information is quite dense however, and I thought the appendixes were extremely valuable. The appendixes include looks at what Crockford considers to be the “awful parts” and the “bad parts” of Javascript. They also include looks at JSLint and JSON as well as providing some helpful syntax diagrams.
Should I Read It?
As mentioned before, the book is short, but very dense. As a result, there is a lot of information covered, but not always a lot of explanation involved. The book seems to take a bit of a different approach than the typical Javascript book…it’s more focused on why than it is on how.
That is not at all a bad thing though. Assuming you have a nice handle on the language and it’s syntax, there is a lot to get out of reading this book. In fact, there is so much information crammed in here that it will probably take several readings to truly grasp all the information being delivered. Don’t make the mistake of assuming that because it is short it is an easy-read…this book covers advanced information and does so at a very rapid pace.
The Final Verdict
JTGP is a great book for anyone who wants a deeper understanding of the why behind the how. I would recommend it to anyone, though I would warn that you’ll want to have a decent understanding of the syntax before reading it…since the book focuses so much on why, there’s not a lot of explanation on how things work, and to get all that this book has to offer, you’ll want to know that. Overall, a very good book that is good enough to demand several readings.
4 Smart Things Were Said
06/6/2008
I was enticed too and pre-ordered a copy. I expected it to be as good as the JavaScript book by David Flanagan. But I was disappointed. Crockford might be one of 10 people or so on the planet who knows most about JavaScript, but my first impression is it’s too advanced and not practical enough. You won’t learn about JavaScript and won’t be a better JavaScript developer just by reading it. I still think Flanagan’s book is still the best and only Javascript book to own.
06/6/2008
I’m still waiting for my copy to arrive.
This book looked to be similar to the javascript book John Resig (a possible competitor for the title of Godfather?) wrote, and I thought that one easily the best javascript book I’ve read. Any idea on how this one compares?
06/6/2008
@Kevin – I agree that it is quite advanced and that not everyone is going to need all the techniques discussed. However, I do think that in larger projects, a lot of the patterns and more advanced theory he discussed will come into play and the information presented will be helpful. I also think that by highlighting the good and the bad, Crockford presents the reader with the knowledge necessary to make informed decisions about what code to use in a given situation based on reliability and availability.
@Nate – Resig is a JS genius…no argument there. His book was very good and some of the information in the two books is comparable, but I do think that Crockford discusses some techniques that Resig didn’t and vice versa. Resig’s book dealt a lot with the how…Crockford’s deals a lot with the why. Put it this way, I have both books and find both of them to be more than useful enough to justify keeping them both around.
06/7/2008
The book is great. I got it as well!
May I also point out to my blog entry where I reviewed 14 video lectures on JavaScript? Here it is:
Learning JavaScript through Video Lectures
URL:
http://www.catonmat.net/blog/learning-javascript-programming-language-through-video-lectures/
Peter