Just a few things to make it more efficient

Effective JavaScript: 68 specific ways to harness the power of JavaScript by David Herman

Whenever you’ve programmed in a language for a while, there are always moments when you step back and want to understand how and why a piece of code works in the way you’ve come to expect. JavaScript is an interesting language, with a syntax that makes it look like a lot of other languages, but which really has semantics that make it very different – prototypical inheritance, scope chains that are make lookup interesting in constructs like with, integer values that are really floating point values in the runtime and variable scoping that isn’t block structured.

This book is a really good read if you want to understand what is really going on. Moreover, it doesn’t just cover what an ECMAScript 5 implementation would do, but covers how the implementation of a particular construct differs across browsers and across versions of JavaScript. Playing with the small snippets of example code in Firebug makes it very easy to see what is going on.

firebug 

I’ve read a few JavaScript books, but this is the most illuminating. For example, it completely clarifies the difference between the prototype property for functions) and the prototype property of every object (Object.getPrototypeof) in a few very well written pages. The discussion of implicit conversions is also very informative, covering material that I haven’t really seen before.

As well as covering the language elements, the book also covers the design of libraries and the mechanisms for achieving concurrency, including promises and web workers. This makes it a thoroughly good way of getting up to speed for writing the mass of single page applications which are surely the future. All 68 gems are well worth a read.

Advertisements
This entry was posted in Books. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s