Scala Productivity. A Survey of the Community

This is a guest blog post is from Graham Lea, Software Engineer and Team Leader at Tyro Payments in Sydney, Australia.

Confession

I’ve been a dishonest blogger, but I’ve paid my dues. Earlier this year I wrote a rather cheeky blog post. I described “A New Java Library for Amazing Productivity“, although I was actually describing the Scala programming language, which also runs on the Java Virtual Machine but adds a functional paradigm. The post was deliberately deceptive, but with a point: I wanted to question the wisdom of making such a clear distinction between libraries, which we seem to add to our applications with not more than a moment’s thought, and languages, which many developers are hesitant to even investigate, let alone adopt. I also highlighted the increasing prevalence of “Trojan languages”, wherein frameworks present themselves as libraries in JARs but actually require learning new languages to be used effectively.

The post got a lot of traction – over 13,000 views by now. Admittedly, much of this would have been among the Scala community, but I also saw some Java-based devs on Twitter sympathising with my main point and encouraging their peers to open their minds to exploring beyond the boundaries of Java in order to increase their productivity.

One piece of negative feedback I received, though, was a blogger who labelled the post “folklore”, adding, “Huge claim… No facts or numbers.” At first I was tempted to flat out disagree: I’d presented 15 features (are they facts?) of Scala that clearly demonstrated productivity gains over coding in Java! Numbers, however, I was short of. Personally I’m convinced Scala is a language that delivers on the promise of getting more things done, but I had never checked whether that view was shared by other people who’d put Scala into practice.

Atonement

Once I accepted the validity of the criticism, my initial reaction was that I didn’t have the resources to collect the kind of long-term, unbiased data that would convince myself that the productivity gains I claimed had been “clinically tested”. Nothing gets me thinking, though, like the suggestion that something is unachievable. So while I knew I couldn’t collect gold standard data, I decided I could use the momentum from the original blog post to collect at least some data, and some data would be better than none.

I created a survey of opinions with the intention of collecting from Scala programmers their insight into whether they felt more productive in Scala. I also asked a bunch of other questions to collect some demographics about the respondents that I could use to correlate people’s sense of productivity with their length of experience with Scala at home and work and their depth of functional programming knowledge.

I consider the response a moderate success. We managed to get 441 responses to the survey – more than I imagined, but not as many as I’d hoped. Importantly for me, the blogger whose criticism initiated the effort came back to see the results and left the comment, “Great survey and sample about the perception of Scala vs. Java productivity.”

As someone who’s been trying to convince people to switch to Scala to increase their productivity, the two most important things I wanted to learn were:

  1. Do NEW converts to Scala get an instant productivity gain, or does it take time?
  2. Do Scala coders need deep FP understanding to feel productive?

While I’m pretty confident productivity will increase for people who stick with Scala, and will increase with more understanding of FP, I also understand the usage Lifecycle and the importance of first contact – if you promise productivity as a core feature and it doesn’t appear pretty quickly, people won’t stick around.

Redemption

I was pleased to see that the results of the survey supported what I’ve been telling people. When I charted the correlation between productivity and years of writing Scala at home, the two biggest categories were people who had 1 or 2 years of experience and felt they were “a lot more productive”.  The results were similar with regard to vocational experience: there were few respondents that had more than a year of using Scala at work, but still most of these reported high increases in productivity.

Most survey respondents with almost no Scala experience said they feel more productive

The results also showed that among those who feel they only have a basic understanding of functional programming (FP), there are still perceived increases in productivity. Perhaps more interesting in this chart, though, was that the majority of people rated themselves as having either an intermediate or high understanding of FP. To me this suggests that people who learn Scala either come with some functional programming knowledge already gained elsewhere, or they quickly develop the view that using Scala effectively requires upskilling in FP and they undertake that challenge.

There is a (self-reported) high level of FP understanding amongst Scala programmers, but those with only basic skills still feel more productive than in Java.

Wrapping Up

Ultimately, I’m confident concluding that the survey results showed that my personal experience with Scala is a fairly common one:

  1. Java programmers who learn Scala generally feel more productive pretty much straight away; and
  2. You don’t need to become a functional programming expert to increase your productivity with Scala.

Both of these conclusion have caveats: reports of productivity come straight away, but the level or reported productivity increased with time. Similarly, for functional programming expertise, the higher productivity levels correlated with higher FP understanding. So, Scala is a library language that provides immediate benefits, but it is also (like most technologies of any depth) one where education in theory and long-term application will continue to extend the benefits.

You can peruse more charts of the results, share your own observations in the comments section and even download the data to inspect your self on my blog at www.grahamlea.com.

Graham Lea

About Graham Lea


Graham has been designing and implementing bespoke, enterprise-scale, distributed systems for over a decade and has been fostering a keen interest in the Scala platform since 2009. He is a JetBrains Development Academy Expert. Follow him on his blog and Twitter @evolvable.

The views expressed in this blog post are those of the individual, and do not necessarily represent the views of JetBrains.

Image credit: Ferrari 458 Italia by Romain Drapri

This entry was posted in Guest Post and tagged . Bookmark the permalink.

7 Responses to Scala Productivity. A Survey of the Community

  1. Jesse Webb says:

    I love IDEA and I really like Scala but I am very disappointed with the Scala Plugin (developed by JetBrains). I own a IDEA Ultimate license but I do most of my Scala development in TypeSafe’s Scala IDE instead.

    I have been given the impression (from the internetz) that JetBrains isn’t that invested in Scala because it is developing it’s own FP language, Kotlin. It compares itself to Scala and aims to solve many of the same problems of Java. This has made me doubtful of ever seeing true, or even good integration of Scala within IntelliJ.

    I like to see blog posts like this which demonstrate that JetBrains acknowledges Scala’s success and popularity. I think competition is great but, at the same time, you need to know when not to reinvent the wheel. Kotlin is interesting and might make more of a splash in the future but right now, we need good tools for working with what works: Scala.

    Please consider making Scala integration a high-proprity issue for future IDEA releases, or atleast improving the Scala Plugin’s usability. I think it would help sell a lot more licenses and further solidify IDEA’s position as the best IDE on the market.

  2. Andrey Cheptsov says:

    @Jesse Thanks, actually we are working on Scala plugin pretty intensively. Would you suggest something particular what we should improve? Actually I agree we have a lot of thing to do to make Scala support as good as we have for Java.

  3. Diego says:

    I just wanted to add my two cents and say that I’m extremely pleased with the Scala integration in IDEA. We’ve moved from Eclipse to IDEA because of this and because it feels so much faster and stable.

  4. Sebastian says:

    @Andrey: How about fixing the many reported bugs? I’m also a paying customer of IntelliJ IDEA and have the same feeling like Jesse that Scala support is not of high priority for JetBrains even though I don’t want to speculate on the reasons.

  5. Tom says:

    Improve the SBT integration.

    Make the REPL easier to access 9maybe it is and i’m just not seeing it)

    It is pretty clear the Scala world is going to stick with SBT so it should be as well support in Intellij as Maven is.

  6. JP says:

    In my opinion Scala is ahead of its time, may be some years with Java 8 will make it more popular between community.

  7. feifei says:

    “years writing scala at home” — emmmm.

    Writing sth at home is TOOOO different than writing code with 20+ people together, who need to read, understand and modify your code all the time.

    Scala suck much at readibility/maintainability that it is much less productive when need many people cooperation.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">