Clojuary summary

It’s been over two months since I decided to learn some Clojure. I didn’t touch exercises for Clojure, nor did I write an app in Om, but I still managed to learn a lot.

The beginnings #

In February, I attended Lambda Days conference. During that time, my familiarity with ClojureScript ecosystem was still relatively low, so the ClojureScript + React.js: How I learned to stop worrying and love the browser talk of Norbert hit the bull’s-eye for me. Later I discussed many different aspects of ClojureScript with him, which made me even more curious about the language.

I promptly finished Aphyr’s guide to Clojure and then I started working on the aforementioned Om app. The beginning wasn’t easy, as I had to fight with Clojure(Script) tooling and cryptic error messages, but it was worth it.

Initially I wrote the prototype in Om, but I found it cumbersome in some places (though it looks like there are some changes coming). Then I found Reagent which—contrary to Om—seemed not to get in my way that much.

I need a hero ? #

But I still wasn’t sure how to handle the state in an app written in a functional language. I came up with some solutions, but I didn’t feel confident about them at all. I needed somebody to come by and say “Hey, do this and that and you should be fine most of the time”.

And that’s when I discovered re-frame. ? Basically it’s an FRP-ish framework built on top of Reagent and its readme explains in a great detail how you should tame the state in your apps. It got me so excited that I’m actually planning on doing a talk about it at an upcoming local JavaScript meetup. Seriously, go read that readme and tell me you weren’t enlightened by it.

Eventually I finished my Ultimate TTT game in re-frame, which made me tackle some issues one usually runs into during development of “real” projects: writing tests, seeking bugs in their or 3rd party code, profiling the code and so on.

Clojuary summary summary #

I must say that learning Clojure & ClojureScript was a pretty delightful experience, despite the initial troubles with the Clojure environment—I’m yet to see a language in which the onboarding is a completely painless process.

You just have to learn the basics. The tooling can be either your friend or an enemy in that. Leiningen & buddies were still waaaay less troublesome for me than tinkering with JavaScript build systems.

For the first time during learning something completely new, I actually got a feeling of understanding how things work instead of bashing the keyboard until stuff runs. That might have been the result of building up certain knowledge over the years, so maybe Clojure wasn’t “something completely new” after all. But it might have been Clojure expressiveness as well (and the quality of tutorials).

I definitely want to write about the learning experience in a little bit more detail, but that’s going to be the topic of my next post, so stay tuned. ?


Now read this


Okay, so the goal is to write a simple app in ClojureScript by the end of February 2015. I’m going to start with Aphyr’s “Clojure from the ground up” series, then write a bot for the upcoming CodinGame “The Great Escape” challenge and... Continue →