Talks

Here is the list of my talks with links to videos, slides and code repositories:

Immutability Against The Machine

Immutability has taken over the software world. Programmers are using immutable values to make their products more maintainable. They are able to focus on higher-level architectural problems instead of hard-to-debug accidental mutations.

However, the software we write often needs to run on a real machine. It needs state, it needs to do many things at once using multiple threads, and it needs to acquire some resources like sockets or files. Moreover, it needs to clean after itself in any condition, even when things go awry, making sure it never leaks memory or resources. We may be tempted to say that solving these concerns requires some old-school mutations. But it doesn’t!

In this talk we will show a real-world application that uses state, multiple threads, and resources. We will use real data from an external Wikidata service, make sure we conform to the API limits, implement a cache, and make sure we release all unneeded connections along the way. Most importantly, all this is going to be modelled as immutable values!

Given at

Fast & Functional

In this talk we are going to create a functional and blazingly fast microservice. We will use functional programming abstractions to quickly mix & match different HTTP libraries, state implementations and concurrency configurations. Each step will be followed by a performance analysis using different tools from JVM toolbox. This talk is for you if you want to see how cats IO monad, async-profiler, flame graphs and wrk are used together to create microseconds-fast Scala service for YouTube videos statistics.

Given at

Tear down this pyramid… using functions and meshes

In this live coding talk you will learn about techniques you can use to better test your microservice architecture. We will build a stateful HTTP-based Pac-Man game engine from highly isolated and testable components using pure functions, type parameters, side cars and service meshes.

I will build a stateful HTTP API from highly isolated components that are easier to test than entangled spaghetti-like codebases. I will show you how tests can help us scaffold the architecture and how should we approach testing in the era of microservices. In the session I will use immutability, type parameters and function parameters as tools to implement a very practical example: Pac-Man collectibles microservice. I will code in Scala using Akka HTTP and deploy to Kubernetes with Linkerd service mesh.

Given at

Freestyle, Free & Tagless: Separation of Concerns on Steroids

You will learn how to cut your applications into isolated, independent pieces using Freestyle library with free monads or tagless final style. The session is based on a multiplayer, purely functional version of Prisoner’s Dillema.

Our applications frequently consist of business logic, communication, persistence, caches & logging. We always want to keep them apart and reason about each of them individually. However, this is very difficult to achieve in practice.

Enter free monad. It lets us decouple those concerns by dividing our program into algebras and interpreters. I will show you an application built on top of free monad in Scala & Cats. You will learn how to create pure & declarative DSLs, side-effecting interpreters and how to use them together. Then I will introduce Freestyle library and show how it makes the code more concise. At the end I will compare the free monad approach to another technique used to decouple concerns: final tagless.

Given at

Developer on Detox

Let’s meet John Craft - a great software craftsman. Today is his last day at work before long holidays. John has just given his functionality to review and wants to leave at 6:00 PM.

This is a story of a code review, in which the reviewer found a few unfortunate issues at the worst possible time - 5 minutes before the holidays.

Let’s put ourselves in John’s shoes and try to decide what is the best solution for a true craftsman, who is interested in both quality and good design. I will talk about illusions, intuition, and decision making.

Given at

Pragmatist’s Guide to Functional Geekery

Basic functional concepts like immutable data, second-order functions, lambdas and function composition can already be found in the modern programmer’s toolkit.

During this talk you will learn about more advanced functional concepts and how they can solve real problems. I will talk about pattern matching, algebraic data types, functional abstractions, folding and property-based tests.

I will show you a practical example written using today’s Java functional constructs and build up from there. I will use only Java & Vavr, which can improve the code, make it more maintainable and testable.

Given at

I can haz no Futures?

Learn how simple functional patterns can be used to make your business logic cleaner and more testable.

Asynchronous programming brings a lot of Futures to your code. Bad news is that they are not essential to what your application really does… You end up with Futures of assertions in your unit tests or, even worse, with Await or expectNoMsg calls.

This is a live coding talk. First I will code an application using Futures in both business logic and unit tests. Then I will get rid of Futures without losing asynchronicity. In the second part, I will do a step by step refactoring of a simple Akka actor system. In both cases I will use typeclasses from Cats library.

Given at

Building muliplayer game using Streams

In this talk you will learn how stream-based programming can be used to implement web frontend and multiplayer backend of the classic game: Snake.

Building dynamic applications using imperative approach tends to create lots of unmaintainable code. Stream-based programming tries to solve this problem by introducing fully declarative way of defining application logic. While using streams, you will focus on WHAT needs to be done, not HOW and WHEN.

The talk is divided into 3 parts. In the first part you will learn how to create a frontend of the Snake web game using streams as building blocks. Then, we will move to the server side and use Scala and Akka Streams library to create backend service that will allow the game to be played by multiple players. In the third part, we will discuss reactive streams and how they make asynchronous communication safe.

Given at

Purely Functional Web Apps

Are you familiar with the following recipe?

  • First define an API and its documentation.
  • Then take the API and create its server implementation.
  • Then create a client for the same API, but in JavaScript land.
  • Then imperatively modify the browser’s DOM in order to allow user to do and see stuff.

Sounds about right?

During this talk you will forget about all these things and become a functional web developer. I will show you how to write type-level web APIs, purely functional server and client implementations and how to render things without touching browser’s DOM.

The talk is divided into two parts: backend & frontend. The first part of the talk will introduce the concepts behind haskell-servant and we will implement a simple web app backend. Then we will code the app itself using Elm and reactive approach.

Given at

Sane Sharding with Akka Cluster

Writing distributed applications is very hard, especially when you start developing them as single-noded ones. Programmers tend to focus on functionalities first, leaving the scalability issues for later. Fortunately, Akka gives us many tools for scaling out and we can use them very early in the development process. You will learn how to take advantage of these features.

The talk is divided into two sections. In the first section you will learn how to transform a single-noded app into a scalable one. During live coding session we will create both versions from scratch and guide you through the most important architectural decisions.

Then we will move on to more important problems. During the second section we would like to simulate missile defence system and protect planet Earth against hostile aliens. Under the hood there will be Scala and Akka Cluster with sharding extension. After describing the application and its internals, we will simulate network and power failures to provide some idea how fast the application can recover.

Under the hood there will be Scala and Akka Cluster with sharding extension. Akka is a great toolkit for creating reactive applications, but it shows its full capabilities when it is run in a cluster.

Given at

Reactive UI by example

A live coding of Snake game using JavaScript, React and streams.

Given at

Typeclasses in a galaxy far, far away

Introduction to typeclasses.

Given at