Book Review: Clojure for the Brave and True

One line review: Clojure for the Brave and True by Daniel Higginbotham is a pretty good intro to Clojure, if you can get past the undergraduate humour.

Clojure for the Brave and True could be thought of as a part of a loose trilogy of books, including Land of Lisp and Realm of Racket,1 that explore modern Lisps in a light hearted way with cartoons.

The first problem with this comparison is that Brave & True is nowhere near as good as Land of Lisp - Barski's jokes are funnier, his cartoons are better, the content is both deeper and broader. Land of Lisp has a chapter called "Let's build a Web Server from Scratch" and it's not lying. Whereas Brave & True won't even show you the ropes on something like Compojure.

The best chapters in Brave and True, which are also the most useful ones, are the ones where you're being walked through a piece of code line by line. The 'Peg thing' game is a great example of a interactive command-line game written using a series of pure functions. This chapter gives you a real idea of how to get some Clojure code doing stuff in the world - a practical toolkit to let you get writing something.

The other great thing about this book is its opinionated introduction to editors. I struggled mightily setting up something to do my Lisps in, having gone through a variety of Vim and Emacs setups with every damn plugin you can imagine. Brave and True has an entire chapter dedicated to getting a decent Emacs environment (you can download the configuration), complete with Cider and Paredit. It's not going to teach you everything you want to know, but once you're done you will be immediately productive and able to get along with the more serious task of actually writing some Clojure.

But I often found the sense of humour in this book grating. It is as if I was forced to hang around with my fourteen-year-old self.2 The one who'd memorized a lot of Monty Python and The Hitchhiker's Guide to the Galaxy and thought that quoting it back at my friends was the height of sophisticated humour. The examples feel contrived to fit the humour, often to the detriment of the point that is trying to be made.

The poorest chapters are the ones where an idea is introduced but not fully explored. When introduced to protocols and records it would be nice to understand how they are used to leverage polymorphism in something more practical than the contrived Richard-Simmons-as-Werewolf examples that felt even less useful than the usual Object Oriented Guide to Animal Taxonomy we're forced to endure.

Brave and True is a good book, and is worth buying and reading (and if you want to sample the content it's all available on the book's excellent website). It's filled me with confidence to write Clojure (probably before other languages) and to read more books on Clojure. I just wish that it had spent less time crapping around with spurious examples and more time showing me how and why Clojure is the best.

Now I'm going to read my favourite introduction to Lisp again (keep scrolling) and maybe finish Land of Lisp.

  1. Guess they couldn't find an appropriate name for an area starting with 'C'. Castle of Clojure? Continent? Cave

  2. Bah, OK. My 20 year old self too. I can still sing all of The Philosophers' Song, I just know I shouldn't.