Are You More Productive In Scala?

JugglingUpdate: The survey has closed and you can have a look at the results here.

Yesterday I wrote a blog entitled ‘A New Java Library For Amazing Productivity‘, which was – in all honesty – a trap: a well-intentioned honey trap with the purpose of trying to convince developers that they should be looking at Scala and evaluating it on the merits of its potential to deliver productivity gains, just as they would with a library or framework, rather than discounting it because it’s a “language”.

One of the comments I received was from Stephan Schmidt who writes the ‘codemonkeyism’ blog. Stephan wrote:

The sad state of our industry: Folklore.

Huge claim: โ€œA New Java Library for Amazing Productivity Posted on February 11, 2013โ€ณ
No facts or numbers.

In my defense, the blog post had nothing to do with proving that Scala delivers huge productivity gains (though obviously I believe it does). It was just trying to get people to try it out rather than avoid it.

However, being a geek, I have trouble avoiding a challenge, so I’ve taken Stephan at face value and have committed myself to trying to gather some statistics on Scala and productivity.

Here’s my attempt: a short survey, just 8 multiple-choice questions, about Scala and productivity. My hope is that, if we can get as many Scala developers as possible answering the survey, we might get something useful out of it. My plan is to let it work its way around the web for about a week and then process the results and publish back here soon after.

Here is the URL to the survey:

I don’t normally ask people to forward my stuff, but please link, post, re-tweet and up-vote the survey as much as possible so we can get some good data:

| Hacker News thread | Reddit thread | DZone thread |

Share Button

Image credit: Robbie Veldwijk

14 thoughts on “Are You More Productive In Scala?

  1. ๐Ÿ™‚

    My take on productivity: It looks more or less the same compared to Java (my basis around 10yrs of Java and the last 4-5yrs only Scala usage as I think Scala is currently the best language for me).

    The driver for productivity is: Don’t write code. If you do not need to write code you’re done. Reduce scope is one productivity technique. When writing code the biggest productivity gain is libraries/frameworks. That’s the main driver for Rails productivity for web development (libraries for everything).

    I also 10x read and think more about code than I write about code. So writing less lines of code is not much more productive to me. Others I understand have a different ratio, for them writing less code might be much more productive.

    Scala productivity vs. Java:
    (+) filter, map, .. makes me a little more productive, not because of the code size, but the concepts.
    (+) Option in particular makes me more productive, no thinking about NULL, no NPEs. This is perhaps the hugest gain for me. Other Monads are also useful concerning productivity.
    (+) Implicits make me more productive, I do not need to care about implicit parameters e.g.
    (-) IDEs still do no complete syntax check, compared to Java I often need to compile Scala code to find errors
    (-) IDE refactorings, completions etc. are far behind Java
    (-) errors are often cryptic: Sometimes it takes a lot of time for me to understand type errors the compiler complains about
    (-) upgrading versions and libraries are a pain, because of binary compatibility. It sometimes takes days to upgrade my environment
    (-) Changing SBT configuration also sometimes takes days to get it working again

    My 2c about Productivity. Would it be for productivity, I’d not use Scala ๐Ÿ˜‰

  2. Just asking people wether they think they are more productive does not result in a good dataset. The people willing to participate in this survey will probably be very positive about scala.

    Better would be to actually measure how much faster programmers are with scala.

    However that is difficult to gather ๐Ÿ™‚
    So let’s see what the results of your survey are!

  3. Since you’re basing the survey on impressions of scala programmers, here’s what I think is the killer question: for those of you writing entirely in scala now, do you ever want to go back to java. Variants: how likely are you to listen to a job offer involving writing java full-time? How likely are you to liste to a job offer to write scala full-time?

  4. I first learned Scala because I’m something of a language junkie and I like functional languages. I’ve stuck with it over the last year-and-a-half for a number of reasons, but chief among them is this: I can flat-out work faster and produce better code faster in Scala than in any other language I’ve ever encountered. I find that using Scala makes it easy to get the ideas from my head into code, and that the result is more likely to be correct and maintainable from the start than in any other language. And the result runs surprisingly fast. (F# and Python are tied for a close second place and I use then where I can’t use Scala.)

  5. One question was how would you rate your knowledge of FP. I would also like to note that my knowledge of FP before learning Scala was MUCH lower. I imagine there are other people in the same boat as me. Just don’t want people to assume only FPers could like Scala, since it may be that people like FP because of Scala. Other than that, good luck w/ the survey!

    • Thanks for the comment, Tom. My aim there is to find out if there are people who are not confident with FP but still feel productive in Scala. I think that would be a good situation as it would give evidence the road to productivity in Scala is relatively short. We’ll have to let the data show what it shows, though. ๐Ÿ™‚

  6. I like the idea of the survey, but I am not sure if you are going to learn much. The questions are very biased towards scala. Do they compare to java only or any other languages? My productivity in scala surely depends on what I am trying to do. If it’s android programming, I tried a bit, but java is still a winner. For server side, scala beats java, not sure if it beats php in direct productivity, but it probably beats it in code maintainability.

    About the question of amount of scala code in the porject… again, compared to what? If I do a webapp project, some code is in scala and some in javascript and maybe a bit in PHP. Having 50% of scala in the project doesn’t mean much as anyway, I wouldn’t be able to do the clientside code in scala.

    I am all for scala, but I am not sure if you will convince the java hardcore users with such a survey.

  7. Have you spent much time with Scala? I’m very very surprised you don’t have

    – “You’ll have to cross compile all your dependencies.”
    – “You’ll have to wade through longer stack traces than usual.”
    – “You’ll have to profile your app’s use of collections and utilities.”

    as disadvantages in your original post. The “when I’m just coding” value isn’t in dispute to me compared to Java, but there is productivity lost either side of that, that is not insignificant.

    • Thanks, Bill. I agree. There are trade offs with any technology choice and often one of them is that power provided by having more abstraction can backfire when you have a problem and need to delve beneath the abstraction to solve it. I’ve tried to capture some of this in the survey by asking not just about people’s feelings of productivity while coding but also about whether the team delivers more value to the business/customer.

  8. I do not know anybody using Scala wanting to go back to anything else.
    Plus the level of abstraction possible makes comparison with Java impossible, because Java cannot even come close.
    No Tuples, no Akka, no pattern matching, a very weak type system, broken generics, no real DSL possibility, no implicit,… There is so many things missing, for the person stating he has the same productivity in Java, please explain to me ????

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.