Programming IO using the MTL style
The objective of the workshop is to get some theoretical and practical overview of the functional approach to IO-based programming. You will learn how to program real applications using Scala, Cats, Cats Effect, Cats MTL, Meow MTL, and others.
During the workshop, we will switch between quick introductions of the core features and longer step-by-step exercises. This will expose you to some features and tools needed to create and maintain production applications.
This event is open for all programmers that know the basics of FP in Scala (immutability, pure functions, higher-order functions, type classes).
- Handling errors (
- Handling State (
- Tagless final & MTL style.
- Eithers in the business logic.
- Using mutable reference (
- Doing things concurrently (
- Purely functional waiting for values (
- Kraków Scala User Group (October 2019)
FP for Java programmers
If you have ever found yourself late at night debugging some impossible bug that “shouldn’t have happened”, only to find out that it was all about some obscure global state change, come join us and see what FP has to offer.
During this workshop, you will learn how to deal with your worst enemies: shared mutable state and code you can’t trust. You will do a set of exercises that focus on dealing with these problems using Java whenever possible and Scala in more advanced cases. You will learn the two fundamental tools of functional programming: pure functions and immutable values.
This event is open for all programmers that know the basics of OOP in Java. Scala knowledge is not required. We will introduce & use only the very basic syntax constructs.
- What is a function?
- Exercise: Imperative vs Declarative
- Functions in Scala
- Exercise: Functions in Scala
- Coding imperatively
- Pure function: imperative vs functional
- Exercise: Refactoring to a pure function
- Pure functions and clean code
- Exercise: Pure or impure?
- Using Scala to write pure functions
- Testing pure functions
- Exercise: Testing pure functions
- Mutability is dangerous
- Exercise: Getting burnt by mutability
- Shared mutable state
- Dealing with the moving parts
- Building our intuitions about immutability
- Exercise: Immutable String API
- Purely functional approach to the shared mutable state
- Exercise: Practicing immutable slicing and appending
- Exercise: Purely functional approach to the shared mutable state
- Kraków Scala User Group (August 2019)
TDDing Functional Web Apps
Get some theoretical and practical overview of the TDD approach & Functional Programming by creating a multiplayer Pac-Man game server.
- First steps in Scala and Scalatest.
- Letting the tools help you (linting, scalafmt).
- Test Driven Development (baby steps, starting with the game logic and moving towards HTTP).
- Purely functional approach (separated data and behaviors, no exceptions, ADTs, Options).
- Modeling using immutable structures.
- Separating the concerns by using functions as input parameters.
- Using Monix Atomic to handle state.
- Using optics to deal with immutable changing data.
- Making impossible states impossible (design, refined types).
- Using function composition to connect all the dots.
Akka in Scala
Get some theoretical and practical overview of the actor model and asynchronous programming.
You will learn how to program real applications using Akka and Scala. Throughout the day we will switch between quick introductions of the core features and longer step-by-step exercises. This will expose you to all features and tools needed to create and maintain production applications. [Details]
- Scala Summer Camp (August 2017)
Functional Architecture based on Free
Learn how to cut your applications into isolated, independent pieces using free monads. The session is based on a multiplayer, purely functional version of Prisoner’s Dillema.
You will learn how to program real applications using Free monad. Throughout the day we will switch between quick introductions of the new concepts and longer step-by-step exercises. This will get you an idea of how real-world purely functional applications look like. [Details]
- Scala Summer Camp (August 2017)
Building Snake using Streams
Learn how to create a real Snake game in the browser from scratch using reactive approach, immutable data structures, composable components and event streams.
- SFI (March 2017)