Maciej Gorywoda - My Scala Story

Anna Zabłotna

06 Feb 2024.5 minutes read

Maciej Gorywoda - My Scala Story webp image

2024 marks Scala’s 20th anniversary! That’s why we invited Scala experts to share their Scala Stories. Maciej Gorywoda is a Product Marketing Manager at JetBrains, IntelliJ Scala Plugin team. You can follow him on X and YouTube.

How did you first get introduced to Scala, and what did you think about it?

Around 2013, I worked in Java as a JIRA administrator and web tools developer for an IT company in Warsaw. I wrote JIRA plugins and some quite logic-heavy web apps for internal use in the company. "Logic-heavy" is a keyword here – in contrast to many other typical Java jobs on the backend, my web apps were supposed to perform complicated tasks, crunch numbers, display statistics, handle many corner cases, etc. It was a one-person project, so I could write the code how I liked it – that is, I kept it simple – but sometimes I felt like I was fighting with the language. It was still Java 7, and I had to write lots of boilerplate for every little piece of logic. I remember that at some point, I started to code my half-baked functional collections with methods like "foreach" and "filter" to avoid repeatedly "for" loops that all looked almost the same.

This way, I got interested in Scala – a language with the collections ecosystem I wanted and syntax that allowed me to write the logic that in Java took a whole laptop's screen in a few lines. I never cared much about more complex abstractions. I decided to learn Scala because it is an efficient, pragmatic programming language.

Tell us about a moment when you realized, "Aha! Scala is awesome!" What Scala's features and capabilities made you feel that way?

So, I graduated from Warsaw University of Technology with an MSc in Artificial Neural Networks. I didn't have much chance to work in the field, but for a long time, I had an idea for an artificial neural network that would work very differently from all the others. Instead of layers, it would have neurons working in parallel as actors, each connected only with a few others and performing a specific task together. They would react to input signals and interpret the time delay between them as additional information.

And then I discovered Akka. It was a perfect framework for implementing my idea. A lot of what held me back before – the necessity of figuring out how the neurons work on separate threads and communicate with each other – was just there. All I had to do was to implement the interesting parts. I did it. It worked. Then, I talked about it at Scalar 2017. The project was just a proof of concept, and I didn't develop it further. Still, it was my "foot in the door" for applying for a professional Scala job and all my later speaking gigs at Scala conferences.

I guess this can also be my answer to the question, "Tell us about a time when Scala proved to be a game-changer in a real-world project," although my project wasn't really that "real-world."

How has Scala influenced your approach to solving programming problems?

In a few simple but very easily recognizable ways. I use immutability by default and pattern matching instead of if/else if possible; I write methods that accept functions and pass them instead of writing interfaces and implementing them and chain data transformations. Even when I return to Java, sometimes, I keep coding in this style.

If you could add a new feature to Scala, what would it be, and how would it benefit developers?

Async/await in the standard library. It's high time to have just one implementation so everyone can focus on something more productive than re-inventing it every few years.

What is your favourite programming meme?

There's a series of programming memes with a normal distribution function, a simple guy or a beginner on the left, an expert/hacker on the right, and a crying programmer in the middle. The beginner wants to do something simply or naively; the crying programmer is angry because he thinks it is much more complicated and needs to be done in a complex way; and the expert again wants to do it simply. I think there’s some wisdom in that.

What are your go-to tools and libraries when working as a software developer?

The standard collections library. Play, if I was working on a web app. mUnit, for unit tests. uPickle for JSON. Maybe ANORM or Slick for handling SQL queries, but I haven't done that for a long time. And I have my own small library for event streaming and parallelization called signals3.

How has the Scala community impacted your programming journey? Any standout interactions or support stories to share?

I started talking at Scala conferences almost immediately after becoming a full-time Scala developer. I met many brilliant people, highly skilled and passionate about their projects. I could participate in those projects and pitch my ideas, but it quickly became evident that the main way I could contribute was not by programming but by writing and talking about programming. I focused on making interesting talks for Scala conferences, I started my own small YouTube channel where I made a series about basics of functional programming, and since I joined JetBrains two years ago, I switched from a developer role to being something in-between a product marketing manager and a developer's advocate – I take care of our relations with Scala developers all over the world.

What advice would you give to someone just starting with Scala?

Focus on basics: the collections library functions as data, pattern matching, handling errors and corner cases with Option and Either, laziness, Future, etc. Libraries and frameworks come and go. With good foundations, you can quickly learn anything that comes your way.

What are your predictions for the future of Scala in the next decade?

Scala will stay a rather niche language for people who want more than Java can offer. I see potential in that – letting Java developers know that Scala can be a good alternative for them, both as a career path and as a technology that can be easily mixed into a Java project for better safety and productivity.

Celebrate Scala's 20th anniversary at Scalar 2024!

You can keep up with the latest news by following #scalaversary on X and Mastodon. And, if you're interested in Scala programming, don't miss the Scala Fiesta at the Scalar Conference 2024. This two-day event will allow you to connect with a fantastic community of functional programming enthusiasts, learn from experienced IT experts, and gain valuable insights. So, mark your calendar and join us for this exciting opportunity.


Blog Comments powered by Disqus.