Codementor Events

How I Learned Clojure

Published Feb 21, 2018Last updated Aug 20, 2018
How I Learned Clojure

Despite being a web developer, I had been working on a relatively stable software stack for at least four years. We basically used PHP and JS for our daily work, but we knew there was a lot of hype around Ruby and Ruby on Rails, and people started talking about the new kid in town, NodeJS.

Motivation

I knew I had to keep up, so I started researching about Ruby. Its meta-programming capabilities and expressiveness made the language really appealing, and the huge community around was a big plus.

Around the same time, a friend of mine told me about Clojure, he was really excited about its power. I caught that enthusiasm, and thus it began my journey into the waters of Clojure, Lisp, and functional programming.

How I approached learning the arts of Clojure

As an experienced programmer, I took the usual path: understand variables, how control structures were written, how to declare and call functions, how classes were defined, oh wait! No classes! Really?

This really caught my attention, since OOP was what I mostly did for several years. I soon remembered my not so pleasant experience using functional programming languages back in college.

Back then, I was all excited about OOP and how it allegedly let you model real world with objects. I saw functional programming as an outdated subject, and for academic purposes.

This time, I decided to give functional programming a real opportunity.

I found this great book, Clojure In Action by Amit Rathore. He covers all the aspects about the programming language and gives you a clear understanding about the key differences compared to a structured programming language.

Thanks to www.4clojure.com, I was able to put in practice what I was learning by solving trivial to non trivial problems.

It took me a while to grasp the new paradigm. Being able to alter variables wherever I needed to was something I was so used to that my algorithms had to drastically change. Thinking in terms of data transformation was a big challenge, but it certainly paid off.

Key takeaways

As Amit said in the introduction of his book:

It will change the way you think about programming, no matter which language you use.

I can assure you this is completely true. My programming style improved no matter what language I had to use to solve the problem. It was like learning to program all over again.

Final thoughts

Enlightening and thrilling is how I can describe learning a Lisp, and Clojure specifically. This is a journey a recommend for any serious software engineer looking to take the next step in his or her career.

Just keep in mind that the road is bumpy and you will probably feel unproductive and frustrated during the learning process. But don't despair, trust me — the reward would be worth the while.

Discover and read more posts from Juan Antonio Plaza
get started
post commentsBe the first to share your opinion
Show more replies