Teaching Scala: ''How Do We Help People Answer a Question if They Don’t Know it Exists?''
Teaching Scala: ''How Do We Help People Answer a Question if They Don’t Know it Exists?''
In preparation for Scala Days, let's look at a few panelists and see what they have to say about the challenges of teaching Scala.
Join the DZone community and get the full member experience.Join For Free
How do you break a Monolith into Microservices at Scale? This ebook shows strategies and techniques for building scalable and resilient microservices.
If you teach Scala, chances are you face a number of questions around mentoring engineers that are new to the language. With our all-star panel of experienced Scala educators and teachers—ranging from academia to industry, in-person education to massive online courses—we’re inviting you to join the discussion Teaching Scala: A Roundtable Discussion on June 20th at Scala Days in New York and get a new perspective on teaching Scala to beginners. Together we’ll discuss past mistakes, lessons learned and how we can most effectively teach Scala.
In advance of the panel discussion, we spoke to the panel participants Ryan Tanner (Twitter), Mark Lewis (Trinity University), Li Neville (Spotify) and Maciej Gorywoda (Wire) about their Scala experience.
Please tell us a little bit about your background and how it led you to teaching Scala?
Ryan Tanner: I’ve been working with Scala since 2011. Currently, I’m a tech lead at Twitter where I teach two courses on the Scala collections library for Twitter University, our in-house education program.
Mark Lewis: I did my Ph.D. work in Astrophysics and Planetary Science simulating the rings of Saturn and I fell in love with programming languages while doing a concurrent Masters in CS. I teach undergraduate courses and do research with undergraduate students. Most of my teaching is courses that involve programming and software development, which is why I try to include Scala as much as possible.
Neville Li: I’ve been working with Scala since 2013 and am working on data engineering and machine learning infrastructure right now. I lead the effort of moving from Python to Scala for data engineering at Spotify and helped onboarding a lot of data engineers.
Maciej Gorywoda: Back in 2013 I was working a lot in Java and I felt I came to a wall. Scala with its conciseness and new ways of thinking was a way for me to overcome that. I started to popularize Scala in my previous company, and for a few years divided my time between Java and Scala. A year ago I moved to Berlin, and now I’m a full time Scala developer, working on an Android app for Wire, an end-to-end encrypted messenger.
Why did you pick Scala and what kind of problems does it solve for you?
Ryan Tanner: I was introduced to Scala by my fellow Scala Days panelist Mark Lewis. At first I was drawn to the elegance of modeling problems with a combination of OOP and FP. At the time I was working in natural language processing and thought Scala was an excellent match for that domain. Today I’m most intrigued by the big-data ecosystem that’s grown around Scala. At Twitter I’ve spent significant time working with Flink and Kafka where Scala is practically the lingua franca. We get both the language tools to expressively model our business domain and the ecosystem to scale it to our needs.
Mark Lewis: Around 2008, I was working with students on using Fortress and X11 (DARPA funded languages for parallel processing) for numerical simulations. Those languages based a lot of their syntax on Scala. I decided to buy the original “Programming in Scala” by Odersky et al to get familiar with the language and syntax. I never went back to Fortress or X11. For me, Scala had the power and beauty of SML combined with the libraries of Java so that I could actually get stuff done. It has been my preferred language ever since.
Neville Li: We picked up Scala because of Scalding, a Twitter open source library for building data pipelines in a FP style. It was a good fit since the Hadoop ecosystem runs on JVM where Scala has the edge over Python on performance and Java on expressiveness. The FP paradigm also encourages composeable code that’s easier to reason about, especially when it comes to correctness. Scala is a great tool for us library designers as well since there are a lot of neat tricks to reduce boilerplate and increase usability of the API. This is great since a lot of our developers are from a data science background and less experienced in typed or FP languages.
What’s the most important challenge Scala developers are facing today?
Ryan Tanner: Those new to Scala are immediately faced with a challenge without necessarily knowing it: what kind of Scala are they going to write? Do they want to write better-Java? Dive right in to Typelevel? Are they even aware of the various “flavors” of Scala? I don’t think I’m alone in saying that many of us stumbled along the edges of this question as we learned Scala. How do we help people answer a question if they don’t know it exists?
Mark Lewis: Given that I’m not a practicing Scala developer on any type of scale, I’m going to answer a slightly different question here. My version is, “What is the most important challenge the Scala development community faces today?” I see the answer to this being talent availability. In part, our panel addresses that because we are talking about how to teach Scala to people. However, to really build the community, we need more developers entering the workforce prepared to be Scala developers, and I think that requires getting more Scala, and functional programming in general, into colleges.
Neville Li: A lot developers I work with are data scientists without a traditional CS background. They mostly use libraries that are designed to be DSLs, e.g. Scalding, Spark, Scio. The challenge is deciding how much “magic” to expose to them in our education and how to help them decipher errors when the “magic” fails. Library builders put a lot of effort into solving technical challenges like type erasure, serialization, type-classes and code generation. These might be technical details that most don’t need to know but would greatly help in building better data pipelines.
Maciej Gorywoda: On the one hand, we have people interested in and pushing towards more FP in Scala. On the other hand, we see a rise in popularity of much simpler languages, like Go and Kotlin. If we want Scala to grow, we need to address both these issues: provide easier ways for people to learn and use FP, and other advanced concepts, and in the same time stay attractive to those who look for simple, quick solutions.
What’s one thing that could address this challenge?
Mark Lewis: Again answering my slightly modified question. Getting more functional into colleges is a battle to educate the educators and get more instructors aware of the benefits of functional approaches to problem-solving. Most educators have been trained in a purely imperative approach, and they don’t have much of a grasp of how basic functional programming can help them, even as many of the building blocks of functional programming, like lambdas, become wider spread in other languages. Educators need to be shown that industry appreciates the benefits of functional languages so that more elements of functional get into the primary pipeline to produce developers.
Neville Li: One thing we’ve tried is to introduce these advanced pattern in bite-size tech talks and blog articles. Over the years we’ve built a community of power users within the company who can support each other and newcomers.
Maciej Gorywoda: Scala is a mixed language, which – as I believe – gives as a considerable advantage over languages focusing only on OOP or only on FP. We have everything we need to attract both beginners and experienced developers, but we need to work on selling it better. In the end, teaching a programming language is tightly connected to popularizing it.
Who should attend your the Teaching Scala panel discussion at Scala Days?
Ryan Tanner: I’m excited to discuss the best ways to teach Scala. I’ll also be talking about a new education program we’re experimenting with at Twitter. Anyone who is interested in better helping new hires and junior engineers should attend.
Neville Li: Anyone interested in teaching Scala should attend the discussion. Also anyone building high level APIs, especially those targeting an audience of not just Scala developers, since that greatly influences newcomers’ view on Scala.
Whom would you like to connect with at the conference?
Ryan Tanner: I’m eager to hear others’ experiences teaching Scala and software engineering in general. Our industry as a whole has a great we could improve upon when it comes to leveling-up our peers. We need to be frank about that and those of us trying to do better need to learn from each other.
Neville Li: Anyone teaching Scala and building high level libraries, particularly in the domain of data engineering and machine learning, since this is an area where Scala has a lot of potential but also a lot of challenges.
Maciej Gorywoda: I would like to talk to anyone involved in helping people learn Scala. If you have some ideas, or simply want to stay in contact, let me know.
Published at DZone with permission of Kathleen Hayes . See the original article here.
Opinions expressed by DZone contributors are their own.