Learning Clojure Fast

There have been several questions floating lately to the effect of “How do I get started fast?” or “What’s the bare minimum I need to know to get hired?”.

In case you’re wondering how to do that… you’re not going to like this answer.

You might be coming from Rails, Django, or some Spring-powered thingamajig. You are used to those opinionated monoliths where the first thing they show you is a zero-to-crud tutorial that takes under 15 minutes. You are looking for the Clojure equivalent so you can (obviously) get started fast.

Because who’d like to get started slow, right?

You might be missing a fundamental part of the Clojure learning curve: if you’re coming from an object-oriented language, you not only need to learn the proper vocabulary, you need to learn new semantics.

Like it or not, semantics are not something you acquire fast. You only get them after constant practice. It takes multiple iterations of walking on the unfamiliar functional road, tripping, getting up, continuing on.

Don’t try to go from the Clojure Koans straight into building a large web app. The koans are a good start, but they mostly teach you how to fill in syntactic blanks and show you some built-in functions. They don’t provide enough semantic practice. It’s also easy to miss the point of the koan and edit around it so that the test passes, without learning what the writer meant.

A much better next step is going through the 4Clojure problems. You’ll need to implement small solutions in a functional manner. Often these functions will be things you take for granted, or which you can do in your sleep in your usual language… and they will still stump you. Once you finally figure one out, you’ll feel like you have climbed a code mountain. You are the leanest, functional-est programmer out there.

Then you see other people’s cleaner solutions, wonder what the hell you were thinking, and move on to the next problem.

You should also read Clojure for the Brave and True before you try to go into any domain-specific Clojure book. It’s a great read, available both online and on dead trees, and will give you more insight on what’s possible with the language.

But more than anything, you need to take your time. It’s a learning journey, not a weekend hacking competition. If you try to run straight after the first baby steps, you’ll end up face-planting the moment you need to go beyond familiar code snippets.

Take it slow. You’ll get there faster if you’re not rushing.


Ricardo J. Méndez