24 May

Book Review: JavaScript – The Good Parts

Category:UncategorizedTag: :


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

8 thoughts on “Book Review: JavaScript – The Good Parts

  1. I remember the day, I watched Crockford’s lectures about javascript and it was amazing. Then, I read the book and I must say, that it is cream of the crop of all books about javascript.

  2. @Jef: The book you mentioned is one of the books on JS that I added to my reading list. Thanks for mentioning it. This confirms that I’m on the right track :-).

  3. It’s definitely an illuminating read. However, I think it should have been called “Javascript: It’s all bad”. Just the way the function keyword is so overloaded with hidden behavior that mutates in very unintuitive ways depending on an ever-shifting context and scope chain is enough to merit “bad”. The language is built on side-effects.

    Brendan Eich can’t really be blamed, after all, it was a quick prototype( no pun intended ) that was a forced munge of programming paradigms ( he wanted to do a Scheme interpreter! Oh, what might have been… ) due to marketing bozos at Netscape. They released it, and the rest is history. Now we’re stuck with it.

    * to future commenters who may reply: yes, yes.. it’s so powerful and I don’t know the language… a poor workman blames his tools…, ad nauseam…. It’s not my problem if you can’t recognize that something can still suck no matter how good you are at your craft. Ask a carpenter to build a house with a spoon sometime.

  4. A good first book would be JavaScript: The Definitive Guide (http://oreilly.com/catalog/9780596000486). From here, one can easily move to the Crockford material. As far as I know, Crockford is still an employee of Yahoo. Yahoo’s YUI theatre (http://developer.yahoo.com/yui/theater/) has a whole bunch of videos of Crockford teaching JavaScript, including some great introductory material, as well as more advanced material. I highly recommend heading over there and downloading a few of his videos if you’re into learning JavaScript.

  5. @Wandering Dude : What does that have to do with the book? Even if it’s all bad, there has to be some part that’s better than other, and that’s what the book is about.
    The book is not for beginners, as Crockford mentions, it is very dense. I’ve never been a hardcore developer so my immersion to JS was painless, but after reading the book and learning more about patterns I can understand why many professional devs that’ve been working in Java, C , .Net, come to JS and get frustrated.

    JS is very “unique/bad”, so it needs a different implementation of patterns that you might normally use. Paraphrasing Crockford, JS is the only language no one learns before using it, but if you take your time to learn it, it will definitely pay off.

Comments are closed.