Monthly Archives: November 2008

Book Review: Javascript: The Good Parts by Douglas Crockford

The phrase “JavaScriptmaster” and Douglas Crockford are considered synonymous in the web development world. When I heard that Crockford was writing a book on JavaScript, especially a guide to the better features of one of the most maligned (and perhaps abused) but popular languages in the current web development industry, I was sure I wanted to read that book. I opened the book with very high expectations and unsurprisingly, I was not disappointed one bit.

With the recent explosion in the usage of JavaScript, the interest in JavaScript is at an all time high. When Netscape, which created JavaScript, released the specification of the language in the mid-nineties, it was unable to define a robust and complete specification for the language due to pressures of rushing out a production release. As a result, fair chunk of the language is not well thought out which contributes to bad programming style and promotes some bad programming practices. It is not the programmers but the language which causes this. Programming models based on Global variables, JavaScript eval, inconsistencies in variable scope, and confusion regarding how objects are created and handled in JavaScript can all be the sources of programming errors and give rise to bad programming practices.

This book, as its name suggests, focuses on the “Good Parts” of the JavaScript while cautioning the readers against the “Bad Parts” of the language. All the  above mentioned “bad parts” and many other programming constructs are cautioned against in a two-part appendix.

Two other appendices also touch  on JSLint, the powerful JavaScript syntax and program correctness verifier and JSON, the preferred and increasingly popular text data exchange format. These two chapters give a taste and a starter for two very important support tools for JavaScript.

However, the meat of the of the book focuses on the better parts of the JS language. In ten chapters, Crockford explains why features like – JS inheritance model, prototypes, objects, arrays and how the language handles regular expressions – are very useful and make JavaScript a fairly powerful language in its own right. Object Oriented programming in JS, how methods and the prototype chain is handled and can be used to write clean and powerful code are all a must read for advanced JS programmers.

The language of the book is very simple and sprinkled with illustrative source code which makes understanding the concept in discussion easy to understand. That said, this is not a beginners book. This book is aimed at those who have programmed in JS and have a working knowledge of the language. Nevertheless, it is a highly recommended book for anyone looking to get into better and more powerful JavaScript programming.

Author Michael Crichton Passes away

Michael Crichton @ National Press Club
Image by ~C4Chaos via Flickr

According to his site, author Michael Crichton died after an unsuccessful battle with cancer. Most famous for the novels Jurassic Park and the Lost World, I first read his book in school, namely Congo. Another of his book, The Andromeda Strain is a book on my reading list.

A very popular Sci-Fi author, he will be quite missed. The literary world has suffered a major loss today.

US Elections 2008

This is one of the few posts on politics I have ever written. I feel it is significant and so I have put across whatever came to my mind.


Felipe Massa Spray
Image by Paul Genge via Flickr

Felipe Massa just lost the Formula 1 World Drivers Championship in the last 5 seconds of the last lap of the last race of 2008. And all due to another driver.

What a heartbreak. Now Lamilton is going to be insufferable. Even more than he is!

Augh.. But Vettel is my new hero. And Kubica too for his last lap stunt.

I was praying so hard for Vettel to not slip and not give up his position. And the entire last lap, my heart was beating as if I’d just run a race. I actually measured it too D: