Which brings us to Jump Start CoffeeScript by Earle Castledine. This is an entertaining yet serious programming book that promises, on its cover, to show you how to “get up to speed with CoffeeScript in a weekend.”
Castledine’s 151-page book quickly takes you, in just one chapter, from “Hello CoffeeScript!” to beginning the process of building a computer game. And, the author promises, it’s “[n]ot just the outer husk of a boring space-based shoot ‘em up, but a complete, extensible HTML5 game with tile maps, particle effects, AI, and (of course) Ninjas.”
Despite the “weekend” tagline on the cover, the book is written in part as a story in which you have one week to develop and deliver the HTML5 game as a software product. But (spoiler alert!), you will, miraculously, finish the process one day early. (This seldom happens in real-life software development.)
If you are not comfortable with the aforementioned qualifications, here’s another warning. To keep the book short, almost every code example is presented as an excerpt. The full pieces of code are contained within a downloadable code archive. While using the book, you are expected to open specific files and add specific lines of code. And exactly where in the file you are supposed to add them seldom is spelled out in good detail. Basically, you are supposed to know this stuff already.
For example, in Chapter 1, you are told to “Plop a canvas element into your web page using a unique ID….”
First, you have to realize that the presented excerpt is part of a particular index.html file that will become an introductory project’s web page. And as for precisely where to plop that piece of code, you just have to know. In the very next sentence, you are told: “Now we need to grab a reference to its drawing context via CoffeeScript….” This is followed by another code excerpt, and: “If you’re compiling this code with coffee, it needs to be in a separate file, compiled, then included in the web page.” And so forth.
If you don’t know what to do without further instruction, prepare to be confused.
– Si Dunn