New to Clojure and don’t know where to start? Here are some books, tutorials, blog posts, and other resources for beginners that I found useful while getting used to the language. I’ll also highlight some resources I’d recommend staying away from due to better alternatives. Brief disclaimer: I have either read at least ~75% of each of these resources – some just weren’t worth reading through to the end.
Let’s start with some books after the break!
These two books are the ones that helped me really get a handle on functional programming and Clojure. I strongly recommend both to beginners as they reinforce one another and will get you to love the language.
Programming Clojure: Written by Stuart Halloway and Aaron Bedra (both contributors to Clojure/core), this is the best starting point in terms of Clojure literature out in the market, in my opinion. The book gives you not only a high level overview of the concepts coupled with applications and examples, but further instills the Clojure philosophy perfectly throughout. As someone coming from an object-oriented background, Programming Clojure gave me an excellent jump into understanding functional programming. The one limitation of this book, however, is that it simply does not have enough space to go into greater depth than it does. There is so much more room and topics to cover… which is what leads me to this next book!
The Joy of Clojure: Michael Fogus and Chris Houser do an excellent job of teaching by doing. The Joy of Clojure dips straight into programming and has no fluff (well a few witty anecdotes here and there). In essence, while an excellent book for beginners, I do recommend you have some background with the language first – be it either on your own, playing around on the REPL, or through the aforementioned Programming Clojure. This book will definitely drive home some key concepts in Clojure. Honestly, it wasn’t until I finished reading this book that I truly understood how to develop larger scale applications in Clojure.
There are two cookbooks out there for Clojure. They provide specific solutions to common problems you may experience and are a useful reference tool.
Clojure Cookbook: Recipes for Functional Programming: A recently released book with a sizable number of recipes (i.e. code snippets) for various problems you may have in Clojure. I personally find this an excellent reference to have if I’m having issues thinking of how to solve a problem and typically just leaf through a few pages to help get inspiration for a solution.
Clojure Data Analysis Cookbook: With a strong focus on the Incanter data analysis library, this cookbook has plenty of useful snippets to get you started with data analytics in Clojure. There are even a few instances where it discusses Java interop and usage of the powerful Java-based Weka library.
Do not recommend
Ultimately there are going to be a number of not-so-useful books. For brevity’s sake I’ll list ones I do not personally recommend below. They aren’t bad per se, but what they each teach is far more effectively taught in the aforementioned readings.
- Clojure in Action (popular book, but personally I find it overshadowed by The Joy of Clojure as a better alternative)
- Practical Clojure
- Clojure Made Simple
There are numerous well written and useful tutorials out there on Clojure. For the sake of this blog, however, I want to highlight two of my favourites.
R. Mark Volkmann’s Clojure – Functional Programming for the JVM: assuming you’re not interested in forking out money to learn Clojure, this is a great introduction to the language, from using leiningen, to setting up your work environment. Furthermore, it’s been around for years now and also constantly updated.
Aphyr’s (aka Kyle Kingsbury) Clojure from the ground up series: this is, in my opinion, a brilliantly thought out and well written blog series. Still under construction, the series presents key concepts and puts them together by tackling a unique (and fun) problem. Highly recommend you check this out.
4clojure: Challenges and small problems to solve! An excellent, challenging website to test your mettle. I strongly recommend this whenever you have some free time, or don’t know what to code in Clojure but want to practice. It is an excellent, constantly evolving resource of problems to fool around with and learn from. Plus there are some really challenging ones listed on this website! If you want a parallel, think a less mathy Project Euler.
Clojure Koans: If you’ve ever heard of or done the Ruby Koans these are ostensibly the Clojure equivalents. A bunch of easy to set up puzzlers to help you test your knowledge of Clojure. I recommend doing these shortly after completing a tutorial or chapter of your choice. Also, I opted to simply copy/paste from the github page into Light Table‘s instarepl to solve each problem versus following the instructions outlined on the website. This is an option I just wanted to point out in case any readers want to the do the same.
Try Clojure: Online REPL. Simple as that. Useful whenever you want to try out a few things but don’t want to open up a REPL or your IDE (such as Light Table).
* Note: this post uses Amazon’s affiliate links for the books section. If you prefer not to click on them, feel free to look up the book through your preferred search engine