Book review: Practical Clojure
Z Jacek Laskowski - Wiki Projektanta Java EE
Practical Clojure by Luke VanderHart, Stuart Sierra (Apress, June 2010)
Kind of Definitive Guide or Reference to the Clojure language - lots of how but not much where and why
When I first heard about Luke VanderHart's and Stuart Sierra's "Practical Clojure", I was really anxious to get my hands on it. I had already read a book about Clojure - Stuart Halloway's "Programming Clojure, so I was pretty much equipped to write Clojure applications. I however needed more practical guidance and the title of "Practical Clojure" seemed to have guaranteed so. As it eventually turned out, the word "practical" in the title came out synonymous to "Definitive Guide" or "Reference" and the book was more tutorial-oriented not practical one. Although it explained the concepts of Clojure way better than "Programming Clojure" I didn't expect to have read a book about Clojure's architecture and overview of available functions. The title made me think that it was supposed to have helped me understand where and why it should be used. The word "practical" upped my expectations high and therefore the book fell short. It's not to belittle this book in any way - the book is highly valued, but the title should've been different.
I'm still faced with the trouble of getting the gist of programming real-world applications in Clojure and "Practical Clojure" didn't yield much increased understanding. I think the title spoiled the real intent of the authors to lend readers a helping hand and turn them into Clojurians which I think was pretty much achieved (once practical aspect's left aside). However, the title still bothers me and was very misleading. Having yet another look at Clojure in a introductory manner surely doesn't hurt. It appears to me that "Programming Clojure" is more practical than "Practical Clojure" despite its name. Both are a must-read and well-written. I don't remember knowing or even hearing about many of the functions mentioned in "Practical Clojure". I really liked reading side notes like the one about recur on page 40 or the caution about conj on page 77 that hit the nail on the head. Figures helped enormously understand the topic. One could say that the book paved the way for a more detailed exploration of Clojure and its practical's part might've stemmed from the fact that I found out a lot without even having noticed or expected it? It could be that way since the writing style is very comprehensible and pleasurable. The authors showed their fluency in writing clearly and straight to the point with many short examples. Introduction-sample-explanation-sample-repeat writing style worked very well.
Many chapters, e.g. chapter 4. "Data in Clojure" and chapter 5. "Sequences", were kind of summary of available data structures and/or appropriate functions. It's very handy when needed, but reading them one by one turned out a quite boring experience. It was not something I'd expect in a book with "Practical" in its title.
The chapter 6. "State Management" paid a great deal of attention to Clojure's STM and I'm quite comfortable with the concept. The authors spared no efforts to explain Clojure with a great care. At some point, I had to stop reading as felt mind-exhausted. So many low-level explanations were terribly helpful, but required constant attention. I'm going to read it over and over again to grasp the concepts in their entirety. Very effective in teaching Clojure's STM and STM in general.
The summaries served as a final guideline how to use Clojure effectively. They weren't only to fill out pages with not-much-useful knowledge. They were as much helpful as the material outlined in the chapter itself. The summary of the chapter 10. "Java Interoperability" could very well serve as an introduction to Clojure.
When I read about multimethods and inheritance in the chapter 9. "Multimethods and Hierarchies" it was quick and very comprehensible. It's of much value when I can flow through formerly-hard concepts easily and be sure to understand them well.
I put the final rating of 4 stars down to the fact that the title of "Practical Clojure" seemed to have introduced a practical use of Clojure not elaborate on Clojure's architecture and available functions. It's highly recommended though (provided you consider "practical" in the book's title less important).
