Is Scala (or whatever else) the Right Choice For Your Team?

In my last post I described the process my team went through to identify a new language (and associated frameworks) for a project we are beginning. The results of that effort was a ranking that placed Scala first, with Python in a pretty close second. That conclusion was reached back in November, but other projects prevented us from making much headway with our decision.

Between November and Christmas we did invest a few dev-days letting members of the team try out Scala and its associated bits and pieces. I gave the team a couple of hours of Scala tutorials, provided a few great “getting started” links, offered help installing the Typesafe Stack and SBT, and provided some pointers about getting ScalaIDE (a plug-in for Eclipse) running smoothly. In short, I blasted the team with the collected knowledge of my reading and working in Scala over the last ten months.

(I should say here that I am not a Scala expert. I can properly use for-comprehensions. I understand the right way to use Option. I really, really love Pattern-matching. I have written about a half-dozen simple applications in pure-Scala. And I have read four terrific Scala books cover-to-cover and browsed dozens of web-sites. I know enough to mentor new Scala users, but I am far from considering myself an expert.)

We dedicated about five half-days for various team members to play with simple Scala, along with Spray, Scalatra and Lift. The results weren’t positive, with most everyone ending up more frustrated than effective.

I knew from my own experience this wasn’t enough time to switch into the Scala frame of mind. In fact, five half-days is just enough time for new users to realize that learning Scala will require a lot more than five half-days. But, due to other projects, that’s where we had to leave Scala until the Christmas break arrived. The goal was to start fresh on Scala first thing in the new year.

As I read and playing around over the Christmas break I started to have some doubts. Our initial experiments showed that my team of really smart engineers, after each investing a non-trivial amount of time, had all gotten approximately nowhere. As manager for the team, I had to answer one simple question: how much time did I honestly think it would take for the team to become productive in Scala, and how long until that investment delivered payback as we began serious Scala development?

This is a question every team must consider before they choose a new technology, method or architecture. How long will it take to learn? Once learned, how long will it take to pay dividends? At the risk of geeking-out, the analysis looks something like this.

oldT = timeToCompleteWorkInOldTech();
learnT = timeToBeEffectiveAtNewTech();
benefitFactor = improvementFactorFromNewTech();

if (oldT > (learnT + (oldT * benefitFactor)))
    // Use new Tech
else
    // Use old Tech

When I ran this equation through my mind, I wasn’t convinced Scala was the right choice. On my return to the office at the start of January, I let the team know that I was worried Scala wouldn’t deliver in our situation. I asked them how they felt about investing the same amount of time experimenting with Python. While they expressed frustration at having to change direction, they remembered the experience they had with Scala and figured it was worth the effort to give Python a shot.

I’ll share the results of our Python tests in my next post.

Prologue

I’ve read enough Scala blogs to know that its devotees are particularly quick to defend the language. I want to be particularly clear that I like Scala, and if I was pursuing an independent project, there’s every likelihood Scala would be my language of choice. However, as a manager I need to consider broader goals than just using what I think is cool.

I am sure there are teams and projects where Scala is a great solution – but those teams need more time and freedom than we have. Every team has a certain “budget” they can invest in learning new tools. Unfortunately, I believe that the learning curve for Scala and its ecosystem is too expensive for many teams. Only the future can say whether Scala will overcome this inherent challenge and gain broad popularity.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s