CoffeeScript Books

Assimilate CoffeeScript Programming with Free Open Source Books

CoffeeScript Books

CoffeeScript is a very succinct programming language that transcompiles into JavaScript, so there is no interpretation at runtime. The syntax is inspired by Ruby, Python and Haskell, and implements many features from these three languages.

CoffeeScript is closely related to JavaScript without having its eccentricities. However, CoffeeScript offers more than fixing many of the oddities of JavaScript, as it has some useful features including array comprehensions, prototype aliases and classes. It allows developers to write less code to get more done.

CoffeeScript is a new language, first appearing in 2009. The first stable release shortly followed in December 2010.

The focus of this article is to select the finest CoffeeScript books which help programmers become proficient coding in this language. The books selected help developers to take full advantage of the power of CoffeeScript. All of the books are published under open source licenses.

We have published a series covering the best open source programming books for other popular languages. Read them here.

CoffeeScript Cookbook

CoffeeScript Cookbook

By David Brady, John Ford, Steven Reid, David Moulton, Sebastian Slomski, and many more (HTML)

CoffeeScript Cookbook is a compilation of CoffeeScript recipes for the community written by the community. Each entry details the problem with an appropriate solution.

Chapters cover:

  • Syntax: Comparing Ranges, Code Reuse on Client and Server, For Loops, Embedding JavaScript
  • Classes and Objects: Class Methods and Instance Methods, Chaining Calls to an Object, Class Variables, A CoffeeScript Type Function, Cloning an Object (Deep Copy), and Create an Object Literal if it does not already exist
  • Strings: Lowercasing a String, Capitalizing Words, Repeating a String, Matching Strings, Finding Substrings, Splitting a String, String Interpolation, Uppercasing a String, Generating a Unique ID, and Trimming Whitespace from a String
  • Arrays: Reversing Arrays, Removing Duplicate Elements from Arrays, Max Array Value, List Comprehensions, Filtering Arrays, Creating a String from an Array, Check if type of value is an Array, Concatenating Arrays, Shuffling Array Elements, Testing Every Element, Mapping Arrays, Creating a dictionary Object from an Array, Reducing Arrays, Using Arrays to Swap Variables, Define Ranges Array, Python-like Zip Function
  • Dates and Times: Finding Last (or Next) Month, Calculate Phase of the Moon for a Date, Get Days Between Two Dates, Finding the Last Day of the Month, Calculate the Date of Easter Sunday, Calculate the Date of Thanksgiving (USA and Canada)
  • Math: Faster Fibonacci Algorithm, Fast Inverse Square Root, Math Constants, Generating Predictable Random Numbers, a Random Integer Function, Converting Radians and Degrees, Generating Random Numbers
  • Functions: Recursive Functions, Splat Arguments, Debounce Functions, When Function Parentheses Are Not Optional
  • Metaprogramming: Detecting and Creating Missing Functions, Extending Built-in Objects
  • jQuery: AJAX, Callback Bindings, Create a jQuery Plugin
  • Ajax: Ajax Request Without jQuery
  • Regular Expressions: Replacing HTML Tags with HTML Named Entities, Searching for Substrings, Using Heregexes, Replacing Substrings
  • Networking: Basic HTTP Client, Basic Server, Basic Client, Basic HTTP Server, Bi-Directional Client, Bi-Directional Server
  • Design Patterns: Command Pattern, Bridge Pattern, Builder Pattern, Singleton Pattern, Memento Pattern, Interpreter Pattern, Factory Method Pattern, Decorator Pattern, Strategy Pattern
  • Databases: SQLite, MongoDB
  • Testing: Testing with Jasmine

CoffeeScript Cookbook is licensed under the Creative Commons Attribution 3.0 Unported (CC BY 3.0) license.

The Little Book on CoffeeScript

The Little Book on CoffeeScript

By Alex MacCaw (62 pages)

The Little Book on CoffeeScript quickly teaches the reader best practices for using this language. The book covers both the client side and server-side applications as well.

  • Discover how CoffeeScript’s syntax differs from JavaScript
  • Learn about features such as array comprehensions, destructuring assignments, and classes
  • Explore CoffeeScript idioms and compare them to their JavaScript counterparts
  • Compile CoffeeScript files in static sites with the Cake build system. Cake is a super simple build system along the lines of Make and Rake
  • Use CommonJS modules to structure and deploy CoffeeScript client-side applications
  • Examine JavaScript’s bad parts — including features CoffeeScript was able to fix

This book is released under an open source license. An updated version of the book (not open source) is available to purchase.

Smooth CoffeeScript

Smooth CoffeeScript

By E. Hoiggard (214 pages)

Smooth CoffeeScript is a book about CoffeeScript and programming. Start with programming fundamentals, learn about functional programming with Underscore and problem solving, study object orientation and modularity. It covers client/server web apps with Canvas and WebSockets. No previous programming knowledge is required. The book spans over 200 pages and includes 35 exercises.

The book is an introduction to programming in CoffeeScript with an emphasis on clarity and abstraction. It is based on Eloquent JavaScript by Marijn Haverbeke.

Chapters cover:

  • Language
    • Introduction
    • Basic CoffeeScript
    • Functions – provides an introduction into the subject of Functional Programming
    • Data Structures – solves a few simple problems. The author discusses two new types of values, arrays and objects, and looks at some techniques related to them
    • Error Handling
  • Paradigm
    • Functional Programming – produces abstraction through clever ways of combining functions. In this chapter, the author writes a set of useful functions to understand how they work and solve problems with them to understand how to use them
    • Searching – introduces new functional programming concepts and their use in problem solving. It goes through the solution of two problems, discussing some interesting algorithms and techniques along the way
    • Object Orientation – discusses the ideas at the core of object-orientation along with CoffeeScript’s take on them
    • Regular Expressions – a language for describing patterns in strings. They form a small, separate language, which is embedded inside CoffeeScript
    • Modularity – deals with the process of organising programs. When structuring a program in CoffeeScript, we do two things. We separate it into smaller parts, called modules, each of which has a specific role, and we specify the relations between these parts
  • Appendix
    • Language Extras – illustrates some extra language constructs and idioms that may come in handy
    • Binary Heaps – explain the details behind this data structure
    • Performance – comparisons between CoffeeScript and CPython
    • Command Line Utility – a utility used to remove solutions from source files is shown here. The program uses the asynchronous file system functions in the same manner as server programs
  • Reference
    • Language Reference
    • Reserved Words
    • Underscore
    • QuickCheck
    • Additional Words
    • Footnotes

The book is released under the Creative Commons Attribution 3.0 Unported License. The download includes book and full source code with and without solutions.

In no particular order, I’ll close with useful free-to-download CoffeeScript programming books which are not released under an open source license.


Ada, Assembly, Awk, Bash, C, C++, C#, Clojure, CoffeeScript, ECMAScript, Erlang, Forth, Fortran, Go, Haskell, HTML, Java, JavaScript, LaTeX, Lisp, Logo, Lua, OCaml, Pascal, Perl, PHP, Prolog, Python, R, Ruby, Rust, Scala, Scheme, Scratch, SQL, Swift, TeX, VimL

Click to rate this software
[Total: 0 Average: 0]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.