26 April 2012

Recreational Programming

The number one sign of a professional programmer is a commitment to continued learning. That's probably true of many if not most professions these days. And a learning programmer, besides doing his/her day gig, probably has one or more side projects going at any given time.

I learned about Project Euler a little over a year ago. I had started learning Python at about the same time, and dove into the Project Euler problems as a means of learning Python. In retrospect, Python and Project Euler are a particularly good fit. Some of Python's language features, such as its arbitrary-precision integers, its generators, its iterator and numerical analysis libraries and its dynamic typing, make it especially well suited to cranking out solutions to these problems. Project Euler has proven freakishly addictive, and it is worthy of a separate, lengthy post sometime soon.

Python was my 2011 language, and Clojure is my language of 2012. The Chicago Clojure meetup recently held a fortuitous newbie-night, where they introduced us to 4clojure, a site with Clojure exercises that you can complete entirely within the browser. For each problem, 4clojure checks your code against a number of tests and tracks your progress. It starts with tiny baby steps, and introduces a new concept with each problem. I think it's a great way to get started. At this week's meetup, someone asked me what I'll do next with it. It definitely helps to have a goal. I may go back and redo some of the Project Euler problems in Clojure, or I may need to find another modest side project and commit to finishing it in Clojure.

Even more recently, someone introduced me to the Haskell School of Music. Another interesting language, Haskell, taught in the context of music and math. How perfect is that? It's so tempting to dive into that with abandon, but I've already committed to Clojure for the year. Maybe I can combine the two somehow, possibly using a Clojure library like Overtone.

No comments: