19 November 2016

Clojure Programming Cookbook - a Book Review

It's been a while since I've looked into programming Clojure again, having been preoccupied with C++ lately. With the new Clojure Programming Cookbook, I've gotten to see a number of new developments in the Clojure ecosystem that is quite exciting.

The book is very example oriented, basically being a collection of code recipes for accomplishing common programming tasks with Clojure. I like how it starts from very basic interactive programming and macro usage (this is a Lisp after all), all the way to talking about concurrency, parallel processing, and cloud-based tasks. Each recipe is accompanied by brief explanations, preambles, and some cross references to related recipes in the book.

Each recipe is basically self-contained, so I wouldn't necessarily recommend reading the book like a book, but instead to use it as a "random access" set of references. The ebook version is probably best in terms of allowing for full-text searching for key terms, and for clicking on relevant topics in the table of contents to look up useful recipes. I'd personally prefer having the PDF ebook, but that's just me.

As a reference book, it's great if you already have familiarity with Clojure, but this book is probably okay for those of you programmers who don't yet know Clojure and want to learn it. I'm not sure it's that great if you just don't know how to program and want to learn programming starting from nothing. On the other hand, I could imagine a course instructor might be able to bootstrap the book with additional content to help absolute beginners get started, then point out recipes in the book to try out from time to time.

What's neat about this book for me is that as I've been away from Clojure for a few years, looking at this book I see recipes for topics I'd like to try out. Topics I've heard of but just haven't followed along with over the years. Like Transducers, and Om.Next. So it's nice to see some self-contained examples of these exciting new developments in the Clojure ecosystem. But given that it is just a cookbook, it doesn't seem to get deep enough into any specific particular topic for me to feel like I really know what's going on. For that, I'd need to look to additional resources.

So there's definitely some caveats, but it is a pretty decent and easy going kind of book. For a lower intermediate Clojure programmer, it's definitely a good resource to look into, maybe to help get you from programming on a single machine to programming for the cloud (AWS, etc.). For upper intermediate programmers who's been away from Clojure for a while and want to see some new Clojure developments, I'd definitely see about getting it if you chance upon a sale. The book lives up to its name as a cookbook.