Five months ago, CoffeeScript was added to my list of day-to-day programming languages when a client decided to use it to build the Node.js backend for a very ambitious cloud platform. The opportunity to learn a language I had heard a lot of interesting things about — like its concise syntax and clear semantics — thrilled me. However, my skills needed to be up to par quickly.
Usually when I find myself in this sort of situation, I prefer to pick up short books that I can read cover to cover in a couple of weeks. For me, a theoritically sound presentation of the basics and a selection of best practices are essential. I usually try to avoid reading books with more than 350 pages other than for references. Once I feel that I’m on the right track, I try to learn by experimenting and reading other seasoned programmers’ code.
My first impressions were not very good. Although the author explicitely warns the reader that the notions presented at the beginning are elementary, the content in the first chapters felt too basic. It is not until the second half of the book that things get more interesting. Basic concepts, like the difference between values and expressions, are discussed at length. While this approach allows for interesting theoritical reflections — like in the section on the tension between encapsulation and extension in object oriented programming — it can sometimes get very boring if the matter is already known to the reader. The author seemed to target absolute beginners and advanced programmers at once.
Sometimes the writing style felt too verbose or almost pedantic. Yet at other times, the theoritical rigor mixed with a strong sense of humour could be refreshing. There’s even a reference to the Monty Python’s sketch on arguments.
Example code was almost always very academic and sometimes a bit convoluted. A better balance between practical and theoritical examples would have been welcomed. This is not a major issue in itself, but it made the text tedious or more difficult to read, especially near the end when concepts are more advanced.
Fortunately, illustrations related to coffee (the beverage, not the language) provided for a welcome breath of fresh air between the dense sections. However, the book generally lacked diagrams, especially when describing certain concepts that could easily be represented graphically, such as closures. The order of chapters was also surprising sometimes; I still wonder why he only explains how to run examples at the end of the book.
Looking for a tutorial on CoffeeScript, this was not the book I expected to read. Instead I got an inspirational and practical essay on functional and object oriented programming. At 15 dollars, it really is a good bargain.Julien Gilli 15 October 2013