Georg Dresler
Tackling Complexity With Functional Programming And Kotlin
#1about 3 minutes
Understanding a complex and unusual feature request
A real-world example of a complex feature request involves an offline form editor that syncs data via JSON embedded in PDF metadata.
#2about 3 minutes
Why traditional try-catch blocks fail for complex errors
Traditional try-catch blocks for error handling either obscure an error's origin or make the code unreadable with excessive boilerplate.
#3about 7 minutes
Using the Either type for robust functional error handling
Replace exceptions with the `Either` sealed class, using `flatMap` to chain successful operations and `fold` to handle the final success or error state.
#4about 4 minutes
Enforcing data validation using private constructors in Kotlin
Use a private constructor combined with a companion object's `invoke` operator to run validation logic upon object creation, preventing invalid states.
#5about 7 minutes
Modeling distinct data states with algebraic data types
Use sealed classes (sum types) to model different states like `Draft` and `Validated`, letting the compiler enforce state-specific logic instead of relying on boolean flags.
#6about 4 minutes
Recap of functional techniques and audience Q&A
A summary of using `Either` for errors, private constructors for validation, and ADTs for state, followed by a Q&A on libraries like Arrow and custom exceptions.
Related jobs
Jobs that call for the skills explored in this talk.
Java / Kotlin Developer in einem Cloud-Native-Stack

PROSOZ Herten GmbH
Herten, Germany
Intermediate
Senior
Featured Partners
Related Videos
Moving from Java to Kotlin
Urs Peter
Route from Java to Kotlin
Christian Woerz
Java Sealed Classes vs. Kotlin Sealed Classes #Slideless
Lothar Schulz
The best of both worlds: Combining Python and Kotlin for Machine Learning
Nils Kasseckert
Build Delightful Mobile Experiences with Kotlin, Realm, and Atlas Device Sync
Timothy Marland
Kotlin Multiplatform - True power of native code reuse
Petar Marijanović
Slip Through the Boundaries of Legacy Systems with Kotlin and Spring WebFlux
Lukas Georgieff & Alberto Gisbert
Building a Friendly Kotlin SDK to Connect to JetBrains Space
Maarten Balliauw
From learning to earning
Jobs that call for the skills explored in this talk.
Software Engineer Kotlin (all genders)Software Engineer Kotlin (all genders)
adesso SE
Leipzig, Germany
Remote
Kotlin
Agile Methodologies
Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd) Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd)
Vesterling Consulting GmbH
Hamburg, Germany
Remote
€55-80K
Intermediate
Scrum
Spring
Kotlin
+4
Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd) Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd)
Vesterling Consulting GmbH
Leipzig, Germany
Remote
€55-80K
Intermediate
Scrum
Spring
Kotlin
+4
Full-Stack Software Entwickler (Kotlin-Angular)
Fincons Group Ag
Bern, Switzerland
Spring
Kotlin
Angular
Openshift
PostgreSQL
+2
Softwareentwickler (m/w/d) - Schwerpunkt Kotlin Multiplattform
SOMI Solutions GmbH
Hamburg, Germany
API
Kotlin
(Senior) Java Backend Developer (Kotlin)
Kaytek Digital Business
Municipality of Madrid, Spain
GIT
Java
Redis
Kotlin
Docker
+1
(Senior) Kotlin / Java Software Engineer - Banking Platform (m/f/x)
Scalable GmbH
Berlin, Germany
Remote
Senior
Java
REST
Python
Kotlin
+5

