« June 2013 | Main | February 2014 »

January 26, 2014

My new coding workout

I’m not going to detail the web-surfing path which led me to discover exercism.io, but I am going to explain why I like it.

The concept is this: exercism by itself is a small command line utility. When you run exercism fetch it gets you a programming exercise, which amounts to a README file and a test suite. The website describes how to set up the command line utility, and how to run the tests in each language supported. It uses GitHub for authentication and to serve the activities; I suspect there’s some git involved in storing the completed solutions as well.

The interesting part is what you do once you have the activities. You don’t just write code to make the tests pass, although you could. You submit your code to the site, and people who have previously completed the activity critique it. There’s a lot of effort put into emphasizing that this should be constructive criticism, and so far it looks like it has been. You get to respond to the criticism or iterate your solution to incorporate it (hence the constructive criticism; it’s more like you’re workshopping your code than being graded on it).

Currently 12 languages are supported, mostly of the “trendy” variety. Perl5 is offered but not PHP. Go, Clojure, Haskell and Scala are offered but not Java or C.

I’m using Coffeescript a lot in my new job, so I’m using these exercises to get my mind used to the idioms of that language rather than leaning heavily on its Javascript basis. I’ve also started doing the Ruby exercises; it looks like there’s a much deeper user base in Ruby, and maybe more exercises there as well (it’s hard to tell until I get deeper). My motivation for trying Ruby is not that I think I need practice but that I think the exercises may teach me some new ways of approaching problems in any language, whereas in Coffeescript, so far, I’ve understood how to solve the problems, but not how to solve them in a Coffeescript way.

This isn’t a site for learning a language; if you’re not at least competent as a programmer the first exercise is going to be frustrating. The parallel with a spoken language would be a “conversation class” rather than a “teaching class”. I’m debating starting the process in Javascript, as a complement to the Coffeescript work; Python is another language where I only barely know it, but might benefit from some work in the idiom.

Posted by pjm at 8:34 PM | Comments (0)