This post is over 6 months old. Some details, especially technical, may have changed.

Clojure Cookbook

Clojure Cookbook

Broad. If I had to describe the Clojure Cookbook in a single word broad would be it. If you're looking for in-depth explanations of all the minutiae and edge cases of a particular topic in Clojure this book is probably not going to fit the bill. If, on the other hand, you're spelunking through the Clojure landscape building apps and generally tinkering with everything you get your hands on then this book is the perfect companion.

What is it?

The Clojure Cookbook, as the name suggests, is a collection of recipes (short-ish articles) for achieving various things with Clojure. Recipes cover a broad range of topics. You'll encounter string manipulation, writing web apps, Datomic, testing with Midje, Cascalog and a bunch of other things. On quick calculation there are about 169 recipes in the book from about 60 contributors, all reviewed and curated by the books authors.

Who is it for?

Good question. A broad book is going to have broad appeal. If you're starting on your Clojure journey you will initially find usefulness in the more low level recipes in the book and eventually graduate to the more general higher level recipes such as writing web apps and accessing databases. But if you've been working with Clojure for some time there is always going to be some aspect or task you've not had to deal with yet and again many recipes in this book could prove useful. At the very least they could act as refreshers for the tasks you only need to approach once in a while.

Another way to consider using this book is as inspiration. If you're wanting to take your Clojure experience to the next level and venture into new areas you could use this book as a sort of guide. This is where I see the charm in this type of book rather than the function. In my downtime I like flicking open the contents and picking a recipe at random and having a play with whatever technique or technology it's focused on.

That said if you like to get down to the nuts and bolts of a topic and really dig into it you're going to need another way to do that. The recipes in this book usually offer some insight into the rationale behind them (they "why?" if you will) but given their terse nature you could be left with outstanding questions. Also, the level of detail in each recipe varies e.g. you can expect more discussion around an article covering, say, string manipulation than you will about broader topics like distributed computing. That said you are never left wondering why you'd actually do the thing you are reading about - it's either obvious or discussed.

Worth it?

Yeah. Listen - you don't need to buy this book. Its available for free online and a quick Googling could often lead you to articles on the same topics but lets think about this a little differently. Books like this are the result of community collaboration, of people coming together and producing a body of work that deserves a place on your bookshelf. So, without getting to idealistic, not only are you enriching yourself but you are celebrating community and I value that.

As a body of work - online or off - whether you are diving into Clojure for the first time or a seasoned veteran about to venture into a new area of the ecosystem there is something in this book you can get value from.

I was fortunate enough to receive a complimentary copy of the Clojure Cookbook but I was in no way contracted to write a review. I do so simply because it's the least I could do to promote a book I find useful.

Published in Clojure on May 15, 2014