…or shall I say “Leaving aside object-oriented programming (in Java) for functional programming (with Clojure)”?
I seem to be getting into functional programming with Clojure steadily. And I’m serious to have it under my belt. I seem to question all I learnt so far about object-oriented programming with Java and am quite often treading on people’s toes, esp. in the Java community in Poland (where I’m active the most).
I don’t question Java features or syntax, or the way Java programmers see things and moreover use Java for everything they design. I don’t even compare Java to Clojure (I wouldn’t be able to and could cause more damage than anyone could afford to accept). What I’m doing is to be asking questions about the purpose of using Java and its tools and frameworks in a given context – an IDE, design patterns, code-compile-debug-run cycle and such.
I think the main reason is that I began noticing things which I hadn’t been able to before Clojure.
It’s also part of my learning process where I think I should leave aside the emotional baggage to Java I’ve been carrying around with me for years. I must admit I learnt how to design applications with and in Java, and it took me years to grasp all the concepts which ultimately turned me into a seasoned Java specialist (a mixture of a programmer, a application designer and an architect).
I’m way too far from claiming I know how to effectively develop Java applications, but don’t think it would take me months to learn and accustomed to it (unless I’ve already).
I’ve already gone through a couple of books about Clojure (see my take on The Joy of Clojure, Practical Clojure and Programming Clojure and vote for them should they please you) and it turns out the reading list is not going shorter any time soon (see Clojure – Grundlagen, Concurrent Programming, Java, and Clojure in Action and, to be released soonish, Clojure Programming). It turns out that all the people who know Clojure well enough have already written a book about the language or are about to do so. It’s a hectic activity to follow along with their reading. Not an easy task after all, is it?
So, I’ve immersed myself in reading the books and in the meantime am trying to find a place for my new skill – programming functionally with Clojure. And, honestly, it’s not an easy task at all. Not after so many years with Java.
But I’m not giving up. Quite the contrary. I may have found a way out – I’ll be developing simple applications around Web development which I used to cover with various Java frameworks like Apache Wicket, Seam Framework, JavaServer Faces (JSF) or recently Grails and some others.
The idea is to follow the path many Java programmers do when they start developing their object-orientation with Java EE. It’s not only about Java Servlet, but a layer atop, be it the aforementioned JSF or Grails. I’m not going to build a yet another framework for Web development (which I don’t understand so well and don’t have time for), but am going to have a bunch of very simple examples of what I used to cover with Java that should ultimately help me to present the goodies offered by Clojure.
I wish I could also be working with someone interested in learning Scala or JRuby this way. I believe it could help me have another view on a problem with the other language’s solution which would eventually lead me to find the right one in Clojure. Ping me if you’re interested.
Should you have an idea for a very short demo with Clojure, I’d be happy to hear so. Even if it’s already managed by a library/framework in Clojure, I’m up for doing it again on my own hoping I learn Clojure better (when the sources of the solution are available and will be able to have a look at a solution).
I’m thinking aloud and therefore what I wrote may not be useable at all and won’t ever be. You’ve been warned.











