4Clojure smugness
February 27, 2012 at 18:34
Nico in Clojure, Clojure

I cannot resist sharing how smug I feel about finishing the Clojure exercises at 4clojure. This has been the most immersing and refreshing programming learning experience in years. Well, Clojure seems to be doing this to lots of people!

I was captivated by the way problems evolved throughout the series. Rudiments first, then the nuts and bolts of functional programming, and finally some very interesting algorithmic problems that made everything click. I very much admired how some teasers matched real world problems. In particular, my preferred problems where those whose obvious solutions were performing badly and had to be refined; they were great lessons in code performance.

The code golfing competition (finding a solution in the least number of characters) is a lot of fun and I found it was a great trick to really think about the best way of doing things. Well, I probably picked some bad reflexes on the way, but I definitely picked some great one too.

Ok, I am not very proud of some of my solutions compared to others'. For the icing on the 4clojure cake really is reading others' solutions once you solved a problem. If you are competitive, be ready to experience some really nasty feelings towards people you don't know (Maximentaaaaal!!!). But what I learned from other coders was key to my overall experience. I made myself a rule *cough* *cough* not to change my codes with hindsight, although I did so when there was a learning point I felt I would miss otherwise.

What caught me in particular was the series of problems that ask to recode built-in Clojure functions. I found it a very clever way of teaching Clojure, but I later overcoded some solutions because I recoded built-in functions I should have used instead! This is a typical case where other's solutions showed me my error and I went back and changed my code (which happened to improve my golf score slightly *grinning*).

Hard to think about what exercises to add to the series, although I am sure it will come!

If you haven't done them yet, go and enjoy the 4clojure problems.

Article originally appeared on Chaomancy (http://www.chaomancy.com/).
See website for complete article licensing information.