Archive for the ‘Book Review’ Category

My inaugural ( book-review is for Clojure High Performance Programming, by Shantanu Kumar.

Unfortunately, for my first review, I cannot be that positive about the book. I found it rather disorganised and chaotic. Concepts are introduced and then briefly discussed, occasionally cross-referenced later. It is often not clear what the relevance of this to programming in Clojure. For instance, we are introduced to branch prediction in modern processors. Not something I know about, so perhaps useful to understand. But it’s not explained why this would be useful to know about. Are there any code examples that show how branch prediction can impact on the performance of my code? Likewise, different forms of CPU interconnect. Or L1,2 and 3 caches. I have the general impression that, as a Clojure programming I am a long way from the CPU; there is not really any sample code given showing how the size of the caches can really impact on my performance.

Worse those issues which can impact on the Clojure programmer are scantily covered. For example, the following (decompiled) java code is shown:

public Object invoke(Object x, Object y){
       x = null;
       y = null;
       return Numbers.multiply(x,y);

Partly, this demonstrates auto-boxing, but as a Java programmer, the code makes no sense, as it calls Numbers.multiple(null,null). It’s never explained how or why this makes sense (Clojure is clearing locals, something which works in byte-code, but cannot be translated into Java source). Type hinting (which I have just had the joy of adding to tawny-owl) is similarly dealt with in a little under 2 pages, despite having a potentially large impact on the performance of (some) Clojure libraries.

In short, as a series of vignettes about different aspects of performance it’s interesting enough; but the whole is no greater than the parts, and it left me with little increased knowlege of Clojure, nor how to make it perform well.


This year I have been on a bit of a mission. I decided that having being here for 8 years, I would actually use the library. So I have started off by requesting books and reading them. It’s been a while since I have regularly read books and it’s been quite an interesting experience. I’ve remembered that reading tech books is quite a reflective process, away from the computer. It’s a less stressful, although perhaps more time consuming experience than hunting through the web, reading documentation or code until you understand what ever it is you are reading about.

I don’t know how long this trend will continue, but while it is, I thought I would write some short book reviews on the books that I have read; as normal, mostly for my own purposes; like many lecturers I get asked for book recommendations, so recording my impressions seems sensible.