Sneaking Scala through the Back Door


Published on

Is your organization committed to the power of the Java platform but stuck in the Java language? Do you spend your time wishing you could use Scala at work, but don’t see how you can get it approved?

There are good reasons to push for it! Scala is a popular language with Java developers because of its expressiveness and lack of boilerplate code. It allows you to focus on the problem rather than the ceremony required by Java. Yet, businesses are often reluctant to move to Scala, citing concerns about availability of developers and risks of working in a new language.

Learn strategies for bringing Scala into your organization, including using it in non-production code, integrating Scala into a Java application, and easing your fellow programmers into functional programming. See how to use Scala for new development while maintaining your investment in existing Java code. Hear stories of how other organizations have done this and succeeded. You’ll leave knowing how you can move to Scala without risking your job or the success of your projects.

Published in: Technology, Education
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • I hope to give you some ideas about how you can bring Scala into your organization, addressing concerns that others might have. Also want to hear from you about what worked and what didn’t.
  • Some companies will come to agreement on changing languages. Some of these tips will still be useful.
  • But we live in interesting times. Whole generation of developers who are still programming in the language they used in college or their first job. Intimidating.
  • Take time to understand WHY your company will benefit and build the persuasive argument. What’s wrong with current approach? What problem are you trying to solve? Concurrency? Performance? Scalability? Extensibility? Persuasive arguments are most effective if you put them in the context of the problem.
  • Talk about business value.
  • Don’t go deep into technical issues (unless you are talking to a highly technical decision maker). And, if you do, give the talking points to that person as well, for reaching others.
  • All points are not of equal weight. A smaller number of strong arguments is better than getting lost in completeness.
  • This speaks to decision makers in ways that they understand. Shows how other companies have experienced success and lets them relate your problems to theirs. Typesafe’s website has great case studies. Read them and find 1 or 2 that seem similar to your situation.
  • It’s not just twitter using Scala.
  • At Netflix, our developers choose their own languages with an understanding of how it will fit into the culture.
  • Talk about hiring. Typesafe’s case studies talk about many companies that used enthusiastic PHP and Java developers in their Scala migration.
  • Once you know the language, use it for new things, preserving your investment in Java code.
  • Call Scala from Java. Call Java from Scala.
  • Preserve your investment in Java code. Don’t refactor “just because”. Only convert libraries that make sense.
  • It’s OK. Get comfortable with the language. Write Java-like Scala code. You will learn the idioms in time. You will become more functional.
  • Low risk way to get to learn language. Testing. Internal apps. Gains confidence of team and management.
  • Early adopters experimented with the language. The language has changed. Read recent blogs and books.
  • Sometimes people use the language to impress. It can be very terse. Write-only. Don’t do that.
  • Scala has less boilerplate. Streamlines focus on business problem. Expressive language illustrates meaning. Fast code/test cycle (Play/SBT).
  • Does your team have C++/STL experience? Google Guava? C# with LINQ? These are all great ways to ease into functional programming.
  • Energetic, eager developers often like to learn new languages. Use this to your advantage in hiring.
  • This is a great testing framework that you can use on Java code or Scala code. It’s not production code, so you can learn the language at your leisure.
  • Let functional programming emerge. You will be enchanted by Scala and simple functional concepts will come first; others will follow. Don’t force it.
  • Stateless. Extensible. Works well with Javascript libraries.
  • If you need scalaz, you will know it. Don’t go there now. Or anytime soon. You will scare people away.
  • Scala isn’t the only language. Keep an open mind. Know when to fold.
  • Sneaking Scala through the Back Door

    1. Sneaking Scala through the Back Door Dianne Marsh OSCON 2013
    2. Try the Front Door
    3. Know the “Why” DO
    4. Present from audience’s point of view DO
    5. Use buzzwords DON’T
    6. Emphasize high value points DO
    7. Represent success stories DO
    8. Typesafe Customers
    9. Edda Records AWS History Open Source Scala Freedom & Responsibility
    10. Killer Apps • Play for web (Scala and Java) • Akka for concurrency • Object-oriented + mathematical modeling = good fit for Scala
    11. Domains • Business Intelligence • Social apps • Border security • eCommerce • Anti-spam • Advertising
    12. Companies say ... • Rapid development and productivity • Asynchronous stateless scalabilty • Massive configurability for peak load • Reduces time to market • DSL reduces load on devs
    13. Anticipate objections DO
    14. Companies say ...• “Easy to find very good Java engineers and excite them with new technologies” • “Look for smart, energetic engineers eager to learn” • “No prior knowledge of Java, productive 2- 3 weeks into project” • “Quickly productive with Scala” • Reduces time to market • DSL improves reduces load on devs
    15. Use Scala for new development DO
    16. Leverage existing Java code DO
    17. Convert all legacy code immediately* *(maybe never) *(maybe never) DON’T
    18. Use Scala as a Better Java DO
    19. Use Scala for non- production code DO
    20. Refer to code written before 2.9 DON’T
    21. Make Scala perl-like DON’T
    22. Discuss developer productivity DO
    23. Draw from team’s experience DO
    24. Use Scala to attract candidates DO
    25. Try ScalaTest DO
    26. Stress about functional perfection DON’T
    27. Try Play web framework DO
    28. Try Scalaz DON’T
    29. Learn about parallel collections DO
    30. Leverage TypeSafe’s support DO
    31. Be a language zealot DON’T
    32. Get feedback from others DO
    33. Contact Info • twitter: @dmarsh • Google+: • email:
    34. Additional References • Making a persuasive argument: • Atomic Scala at • Learn Scala with the Koans at • Integrate testing with Scalatest: • Case studies: • Futures and promises in 2.10: in-scala-2-dot-10