How JavaScript Works

How JavaScript Works, Douglas Crockford, Virgule Solidus, 2018

You will remember Douglas Crockford, creator of the JSON Data Interchange Format, the world’s most loved data format, and the jslint utility to help you debug your code. He is an opinionated JavaScript expert who wrote “JavaScript: The Good Parts” . The book rightly suggested that you just use the good features of JavaScript, and shun the bad ones.

His new book, How Javascript Works is not for beginners. It is scathingly critical of JavaScript, though the language is clearly the author’s favourite. It explores cases where JavaScript does unexpected things, or things which are clearly incorrect. It compares features with how they work in other languages. For an example of a questionable design decision, numbers are stored as floats. This has implications which can trip you up and we learn all the details.

Crockford devotes a few chapters to discussing the libraries he created to support big numbers and a rational data type. This is an opportunity to learn how to write great code.

A humorous book, net weight 1 pound (it says so on the cover), publisher name is Virgule Solidus. That is printed on the cover in a slanted font with the l’s aligned vertically, and Crockford has explained that in latin both the words mean forward slash. (as you no doubt know, slashes start a comment in Javascript). Crockford has started to correct the English language, and as a first step he has changed the spelling of ‘one’ to ‘wun’. Very good!

The book is clearly self published. I wish O’Reilly had edited it!

JavaScript Ninja

Secrets of the JavaScript Ninja, second edition, By Resig, John (- 2016)

John is the creator and lead developer of the jQuery UI library, so I am not surprised to find that this is an excellent book. It is not for the beginner programmer, but if you have a bit of JavaScript experience then you will find this book rewarding.
Continue reading “JavaScript Ninja”