The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Book Report - JavaScript: The Good Parts

posted under category: General on March 20, 2011 at 1:00 am by MrNate

Another book I finished on my path to even getting to the books I scored over the holidays was JavaScript: The Good Parts. Let's see, how can I describe a book like this? Maybe like so: this book should be required reading for web developers before ever touching a script tag or js file. Of course we know the entire Javascript domain is riddled with bad code and bad parts, which is why a book like this is necessary.

JavaScript: The Good Parts is the ultimate Douglas Crockford book that shows this man's mastery of the JavaScript language. I've seen him speak a number of times thanks to the Yahoo Developer Network's YUI Theater. Crockford knows his stuff, it's impressive, and to have it all in text makes this book a real treasure.

The book takes a walk through JavaScript as a language, how to use the best features, the best way. It makes our old friend (or enemy!) JS really feel like something that wasn't hacked together in the Netscape basement over a decade ago (even though it basically was). A lot of attention is given to object & function composition, as it is a tricky subject especially in Javascript and something you need to figure out before you get too deep.

Crockford has some amazing quotes, too. Here's one from my favorite chapter, Chapter 9: Style, on the subject of how we format our written code.

JavaScript allows variables to be declared after they are used. That feels like a mistake to me, and I don't want to write programs that look like mistakes. I want my mistakes to stand out.

A word of warning, this book is for the true hackers. If you are getting into programming for the first time, don't even try it. If you are still working on the mouseovers for your first web site, this book won't do you any good. If you can't see where the DOM ends and the Javascript language begins, maybe practice up a bit. This book is about programming, not about web pages.

I read the book through Safari Books Online via the Safari browser on my iPhone. The good part was that it didn't log me out even once over the course of the 5 months I had the tab open (so it took me a while, did I mention I have kids?), and the mobile formatted site is great. The bad part was that every time I re-visit it after a few hours, Safari reloads the page; I have to wait for all the assets to download before I can continue. They need an app for that in a bad way.

Again, it's an O'Reilly book, so you may be able to score a copy from your local user group in trade for a publicly written review like this. If you like the sound of it, you can pick up JavaScript: The Good Parts from the publisher's site or from Amazon, a steal at about $17 today.


No Comments Posted Yet! - Too old to comment!