The Dopefly Tech Blog

« The Dopefly Tech Blog Main page

Book Report - JavaScript: The Good Parts

posted under category: General on March 20, 2011 by Nathan

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.

Nathan is a software developer at The Boeing Company in Charleston, SC. He is essentially a big programming nerd. Really, you could say that makes him a nerd among nerds. Aside from making software for the web, he plays with tech toys and likes to think about programming's big picture while speaking at conferences and generally impressing people with massive nerdiness and straight-faced sarcastic humor. Nathan got his programming start writing batch files in DOS. It should go without saying, but these thought and opinions have nothing to do with Boeing in any way.
This blog is also available as an RSS 2.0 feed. Click your heels together and click here to contact Nathan.