Sometime in the last week I read an article about Scala, actually I think it was the interview with Twitter engineers about Scala vs. Ruby, and it really sparked an interest in the language for me. I’m sure at least part of the reason is because I’ve been writing mostly JavaScript lately and reading a description of Scala it seemed like a number of the functional programming practices I’ve picked up writing JavaScript would carry over well. At the same time though Scala is built on top of Java, a language I’ve become intimately familiar with even if it has fallen somewhat into disuse. Last week after reading the article and feeling this resonance with what I read further about Scala I decided to jump into it and see how much I could pick up.
The Scala website is well documented and has a number of good tutorials but something just wasn’t clicking in my head about the syntax or the language in general. I think feeling like I could get a handle on this language quickly is what has really driven me to obsess about it this past week. I ordered Programming in Scala from Amazon (before Amazonfail as it’s being called on Twitter [From AmazonFail to SorryAmazon]) which I’ve read about 200 pages of and continued to read over (and over) the pdf tutorials available to me. This weekend I started putting together an application written in Scala to be deployed on Google’s AppEngine since they released Java support and Scala compiles to Java. Additionally, my tentative plan for the application is to make use of a number of ‘Social APIs’ which are coming up more and more at work but I still know quite little about. The first API I decided to work with was Twitter’s and in just a couple of days (maybe 16 hours) of work I have the basic model classes written along with BDD specs for them using Scala Specs, and I’m also able to pull the data I want from Twitter and deploy to the AppEngine service. All in all I’d say not bad for a weekend’s work. There is of course quite a bit left to do before the application is finished but I’m proud of the first steps I’ve made. If inclined, the source for this experiment is publicly viewable as twitter-favorites on github.