How to bring Scala to Enterprise IT

Yesterday was the first day of a conference for Java developers in Kiev, Ukraine. I delivered two presentations and attended three delivered by very good speakers. Reza Rahman from Oracle opened the conference with an overview of Java EE 7. This is a Ukrainian version of Reza:


Then I attended a presentation on functional programming in Scala by Jacek Laskowski from IBM. I thought I had a pretty good understanding of what functional programming is about from JavaScript. I know what closures and callbacks are. But this presentation demonstrated how to take the concept of functional programming and dynamic typing to the extremes. Half of the time the audience was guessing what a particular language expression could mean, while the second half Scala compiler was guessing what should be the data type of a certain variable or expression. Here’s one of the not for the faint of heart examples:

(Int => Int) => Int

This presentation has confirmed my feeling that I can easily retire without even looking in that direction. Not because I’m not getting excited by new toys for programmers. I’ll definitely read a book on Scala to be a better programmer in other languages. But it’s impractical in today’s enterprise development where people prefer Hibernate to SQL and Spring to Java. This is a world of framework coders. (Int => Int) => Int? Yeah, right.

The presentation by Dr. Venkat Subramaniam was engaging and well done as expected. He was comparing different languages that run on JVM. The audience had to fill out a spreadsheet assigning weights to different features of the languages Java, Java 8, Scala, and Groovy. For example, if having a dynamic typing or meta-programming support is very important for your project – give them a 100. If you don’t care about those – give them a 0. If you somewhat care – give any number in between. On the right hand side of the spreadsheet the numbers would add up showing that functional languages are in the lead.

But this spreadsheet was missing two rows: talent pool and community support. If these two rows were present, Java would have left other contenders in the dust. Imagine a hypothetical situation, when I’m running a typical enterprise project that includes seven Java developers one of them being Venkat (this makes a project not so typical, ain’t it?). Venkat convinces me that one of the newly developed modules has to be done in Scala, which will save us on development time, the code will be concise, and we’d just need to add one more Scala jar to the hundred of Spring/Hibernate jars that we already have anyway.

Let’s say I agreed to this, Venkat did a good job, the module was written fast and worked as expected. Do you know where am I leading? Exactly! For some reason Venkat decided to leave our firm. Now what? Who’s going to maintain this code? The talent pool of Scala developers is miniature. The community is small. No good.

But this presentation by Venkat made me thinking of how to make efficient and JVM-based languages practical in the enterprise setup. Here’s how to do it. If you have a team of several Java developers and want to introduce Scala, Groovy or any other exotic language, do not hire a person who knows this language. Hire an instructor to teach the entire team how to program in this languages and let one of the developers use it in your project. This way you’re covered. The chances that all seven developers quit on you are slim.

I believe this can become my New Year’s resolution: I’ll master Groovy myself, then will teach our entire team and find the right piece of the software to be written in Groovy. What about Scala? This may become my resolution for 2015, I guess.

This is my takeaway from the JEEConf. This blog can serve as an example of why attending technical conferences is a must for any software developer. I’m looking forward to my next conference-vacation in August.


14 thoughts on “How to bring Scala to Enterprise IT

  1. Great blog, I definitely agree that community of Scala is miniature comparing to Java-community. However in practice the problem is not the people. There are hundreds of Scala developers in every city that are very enthusiastic about the language, but work on Java projects because they cannot yet use their skills on job market. They will join you project because you have Scala as oppose to Java, not because of salary or other reasons. Also definitely people who decide to master Scala are probably more into technology and engineering than a typical Java developer, that may be very interested or just hate IT, but work there for high salary. Scala and other (semi-)functional programming languages are a detector now of technological curiosity and desire to improve.

    We use Scala in our project. We do experience problems when it comes on deciding on best practicies, looking for guidance from real pro’s. However this really worked as a filter for our team to get rid of developers, that are not enspired by IT.

    I intentionally missed the technical benefits of Scala to focus on your question on job market and impact on the team. I definitely agree on many points of this blog article, but I would like to know your opinion on the subject if you look from another direction

  2. Yakov,
    I totally agree with you. I feel it’s so tempting to use Scala in my mixed .NET/Java projects. But I am quite unsure what may happen if developers start leaving the team… I would have to search for guys with Scala knowledge. But “Scala pool” is so small. I was excited by talk of Venkat but feel your point of view is more realistic.

    Could you give a link to your “Surviving as a professional software developer” presentation? It was really awesome and I want to share your minds to my software development team. Thank you 🙂

  3. Hey Yakov, thanks for your take on my presentation about Scala. I fully understand your point and even support it, but my talk was more to encourage people to give this new language a try (for the mere sake of learning a new language) than to learn them how to use it in their projects and perhaps leave Java or other languages.

    I really should’ve not used (Int => Int) => Int in my presentation as I got so many comments about presenting the slide with function type that I barely noticed a person who’d benefited from it. It was completely not necessary for the talk and was more confusing than useful. I had to try it out in public anyway to learn I shouldn’t have. Lesson learnt.

    As to Scala’s adoption, I believe it’s us, developers, to take a stand and choose the best tool for a project. If Scala’s not, I’m fine. But if it is, I’d do my best to have it as we’re in charge of picking the right tool for the job. Obviously, it needs cooperation and broader support in a team and that’s the *only* reason I’m going to conferences and presenting the topics hoping to hone my skills (in Scala, Clojure, whatever solution I’m presenting) so I’m able to pick the right tool. The more people are engaged in a conversation about a potential use of a given technology/language the better – for me, for them, for everybody. Let’s talk!

    Thanks Yakov for bringing it up. It could be a nice topic for a discussion panel or a JUG meeting. I’d love being a part of it. I’m always grateful to be corrected.

    1. Jacek,

      I’ve attended both of your presentations. I wanted to hear about Scala and went to your first presentation. I went to your second preso on Closure not because I care about Closure that much, but because you are a good speaker.

      As to making Scala popular, a lot more efforts should be made. Praising the language among enthusiasts won’t cut it. I remember how a small crowd started making noise on Ruby on Rails. They were trying to shake the boat as much as they could, but RoR never became a mainstream.

      Scala community needs enterprise support or else… I know, hearing such sober but boring statements is not what you’d like to hear. But unless you and other enthusiasts will gain enterprise support and show some production deployments, Scala will remain a tool for a selected elite and geeky conferences.

      To get the enterprise support, Scala needs to gain support of enterprise development managers who’d be willing to TEACH THE ENTIRE TEAM to mitigate risks. As much as I respect Venkat, his attitude “If they don’t accept the right way – run away from there” is not an efficient way to promote Scala either.

      Anyway, I like functional programming and wish Scala the best. If you’ll ever plan to visit New Jersey, USA I’ll be glad if you could find time to present on Scala at our Princeton JUG: If you know someone who lives in New Jersey and is willing to present on Scala please have them talk to me.

      1. Hi, Yakov
        I attended both of your presentations on jEEConf and liked them very much. Thank you.

        As for enterprise support for Scala, it seems this process is started. I work for big (world wide) company. In our company Scala got production approvement and we have a few PoCs on Scala in progress, which were initiated by IT management.

  4. I do believe that Paul Graham has already answered (so to speak) to your concerns, Yakov, in the article ‘Revenge of the Nerds’.

    Learning Scala (and Clojure) in a proper way is not a trivial undertaking.

    Scala is a language for a higher-than-average software engineer, and I can hardly imagine dozens of shops with teams more than 10 persons actively using the language on a daily basis.

    P.S. Many thanks for your participation at JEE conference (especially the part reminding all of us here, in Ukraine, the importance of soft skills).

  5. Bravo, Yakov! I was waiting for you embracing Groovy (and Grails) for a long time!
    Eager to learn that in real depth from you!
    Not sure about Scala, but Groovy is so easy and natural for any Java pro…

  6. Well, Java predominantly of course has been around for a long time. I started the programming in Java right about the time it was introduced. Then of course as years went by I started picking up other languages and notably of course Groovy and I picked up Groovy a few years ago, I’m going to say maybe five or six years ago, I can’t remember exactly when I did. Programming with Groovy for a while. And I wrote a programming Groovy book along the way and then I got excited about Scala and picked up Scala along the way and then I wrote a programming Scala book. So I would say most notably those are the two languages I play with most of the time on the JVM. I also have worked a little bit with at the Clojure so I would say these are the four languages and of course a little bit JRuby as well. So I tried to stay up with most of these languages but definitely Scala and Groovy more in depth than the others.

Leave a Reply to Eugene Ignatiev (@eignatiev) Cancel reply

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

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

Facebook photo

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

Connecting to %s