Posts by Year


Kotlin Flows - The Ultimate Guide

41 minute read

This article thoroughly covers a crucial concept in Kotlin Coroutines: Kotlin Flows. Flows are a reactive data structure you probably didn’t know, but you ca...

WebSockets in Http4s

39 minute read

Learn how to use WebSockets in Scala with Http4s, and how to enable two-way communication between the frontend and the backend.

Back to top ↑


A guide to UDP in Scala with FS2

30 minute read

Understand how UDP works, and how you can transition from an old Java NIO implementation to a higher level API like FS2 in Scala.

The Ultimate Guide to Java Virtual Threads

32 minute read

Project Loom and virtual threads promise to bring modern concurrency paradigms that we already found in Kotlin (coroutines) and Scala (Cats Effect and ZIO fi...

Back to top ↑


An introduction to SBT

21 minute read

Learn how to set up and configure your Scala projects with SBT in this long-form tutorial.

Slick Tutorial

19 minute read

An introduction to the popular database library in Scala: Slick.

Free Monad in Scala

16 minute read

A tutorial on the Free monad in Scala, how it works and what it’s good for.

Back to top ↑


A 2021 Retrospective

5 minute read

Wrapping up 2021 with an overview of what’s happened this year at Rock the JVM.

Learn Doobie for the Greater Good

31 minute read

We rely on the JDBC specification if we need to connect to SQL databases in the JVM ecosystem. However, JDBC is not a good fit if we use functional programmi...

Tagless Final in Scala

12 minute read

Demystifying the tagless final pattern in Scala. TLDR: it’s got nothing to do with type classes.

Evaluation Modes in Scala

3 minute read

We’ll take a look at some core Scala constructs and look at them from a different angle than we’re used to.

Akka Streams Backpressure

10 minute read

Akka Streams implements backpressure, a critical component of the Reactive Streams specification. This article is a demonstration of this mechanism.

Kafka Streams 101

31 minute read

Apache Kafka is clearly the leading technology concerning message brokers, and Kafka Streams brings a complete stateful streaming system based directly on to...

Custom Pattern Matching in Scala

6 minute read

Pattern matching is one of Scala’s most powerful features. In this article, we’ll how to customize it and create our own patterns.

ZIO Kafka: A Practical Streaming Tutorial

22 minute read

Apache Kafka has proven itself as a reliable and scalable communication bus between distributed application components. We’ll learn to use ZIO to interact wi...

Exploiting Implicit Ambiguity in Scala

5 minute read

In this article, I’ll show you how you can exploit the implicit resolution mechanism in Scala to enforce type relationships at compile time.

Scala 3: Anti-Givens

3 minute read

Showing a Scala 3 trick that few developers know: exploiting the absence of a given instance to enforce type relationships.

ZIO: Introduction to Fibers

11 minute read

Many libraries implement the effect pattern in the Scala ecosystem, and every one has its own concurrency model. First, let’s introduce the ZIO library and i...

Scala Functional Collections

7 minute read

A short article with a powerful idea about functional collections many Scala programmers do not know about.

Cats Effect 3 - Racing IOs

5 minute read

After the previous introduction to concurrency in Cats Effect, we’ll look at how to manage racing IOs and fibers.

Scala 3: Extension Methods

4 minute read

Deconstructing extension methods, one of the most exciting features of the upcoming Scala 3.

Akka Typed: Adapting Messages

7 minute read

In this article we’ll see a good practice for organizing code, messages, domains and logic in an Akka application with Scala.

Semigroups and Monoids in Scala

7 minute read

This article is about Monoids and Semigroups as a gentle introduction to functional abstractions and to how the Cats library works.

Organizing Services with ZIO and ZLayers

12 minute read

ZIO layers (ZLayers) help us structure our complex services into modules that are independent, composable and easy to understand. Let’s take a look.

Value Classes in Scala

12 minute read

An ad-hoc type definition technique for eliminating bugs which are hard to trace, with implementations in Scala 2 via newtypes and in Scala 3 via opaque types.

Mutability in Scala

5 minute read

Although frowned upon by FP purists, creating and managing mutable data structures is important in any language. Scala has some first-class features.

Idiomatic Error Handling in Scala

8 minute read

Error handling is likely one of the most frustrating part of programming, and in Scala, there are better and worse ways to do it. Let’s take a look.

Match Types in Scala 3

6 minute read

Scala 3 comes with lots of new features. In this episode, match types: a pattern matching on types, and a tool for more accurate type checking.

Algebraic Data Types (ADT) in Scala

9 minute read

Every developer using Scala meets the acronym ADT sooner or later. In this article, we will try to answer all of your questions about ADTs.

Objects and Companions in Scala

4 minute read

This article is for the starting Scala programmer: an introduction to singleton objects and companions in Scala, what they can do, and why and where we shoul...

What the Functor?

4 minute read

In this article, we’ll explore one of the most used (and useful) concepts in pure functional programming: the Functor. Pretty abstract, so buckle up.

Back to top ↑


Given and Using Clauses in Scala 3

6 minute read

The given/using clauses are some of the most important features of Scala 3. Read on for the essential concepts and how to use them.”

Let’s Talk About the Scala 3 Indentation

6 minute read

Some people love it, some hate it. Scala 3 indented syntax is not that bad, and it might actually help. Let’s take a look at how Scala 3 can change the struc...

ALL the Joins in Spark DataFrames

6 minute read

It’s obvious that Spark allows us to join tables. What’s not obvious is how many different kinds of joins Spark supports. We explore them in this article.

Type Lambdas in Scala 3

3 minute read

Exploring a quick but powerful structure in Scala 3 - type lambdas. This will help you think higher-level.

Scala 3: Opaque Types

4 minute read

We discover opaque type aliases in Scala 3 and how we can define new types with zero overhead.

Scala 3 Traits: New Features

4 minute read

This article will continue some of the previous explorations of Scala 3. Here, we’ll discuss some of the new functionality of traits in Scala 3.

Enums in Scala 3

3 minute read

Scala 3 introduces enums. About time! Even though it might seem like something minor, it has important implications.

New Types in Scala 3

6 minute read

Scala 3 introduces some new kinds of types, which we’re eagerly awaiting for.

Refined Types in Scala

5 minute read

We look at how we can impose constraints on values at compile time with the Refined library.

Underscores are Overloaded in Scala!

3 minute read

Scala syntax is so confusing sometimes - I’ll show almost all uses of underscores in Scala. Sometimes the philosophy is inconsistent, but it’s worth at least...

How to Use Akka Streams Graph DSL

6 minute read

Akka Streams has the Graph DSL, which is one of its most powerful APIs. Learn how to use it and get started quickly with Akka Streams.

Akka HTTP to Heroku in 10 Minutes

4 minute read

Akka HTTP is super easy to deploy to a web server. Learn how to use Heroku and deploy your first Akka HTTP service in minutes.

4 Nice Ways to Read Files in Scala

2 minute read

Learn to read files in Scala like a boss and compare it to other styles in other languages. We write a simple API which looks almost as easy as Python’s read...

Reading Spark DAGs

5 minute read

We walk you through one of the foundational skills for Spark performance optimization: reading the Spark UI and the graph of how your job is structured.

Reading Spark Query Plans

5 minute read

In this article you’ll learn one of the most important Spark skill: reading how your job will run. This is foundational to any further Spark optimization.

Controllable Futures in Scala

3 minute read

In this article we learn to address the problem of “deterministic” Futures in Scala, using Promises.

8 Scala Pattern Matching Tricks

6 minute read

Pattern matching is one of the most powerful Scala features. Learn to use it to the max so you can write your best Scala code.

Back to top ↑