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.
PROSOZ Herten GmbH
Herten, Germany
€47-70K
Junior
Intermediate
Senior
Java
MARKT-PILOT GmbH
Stuttgart, Germany
Remote
€75-90K
Senior
Java
TypeScript
+1
Matching moments
02:33 MIN
Why you might not need JavaScript for everything
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
02:49 MIN
Using AI to overcome challenges in systems programming
AI in the Open and in Browsers - Tarek Ziadé
09:00 MIN
Navigating the growing complexity of modern CSS
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
03:05 MIN
Building collaborative design tools and the neo-brutalism trend
Slopquatting, API Keys, Fun with Fonts, Recruiters vs AI and more - The Best of LIVE 2025 - Part 2
03:31 MIN
The value of progressive enhancement and semantic HTML
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
03:58 MIN
Making accessibility tooling actionable and encouraging
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
01:32 MIN
Organizing a developer conference for 15,000 attendees
Cat Herding with Lions and Tigers - Christian Heilmann
03:16 MIN
Improving the developer feedback loop with specialized tools
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
Featured Partners
Related Videos
Algebraic Data Types + Pattern Matching = Elegant and readable Java code
Balkrishna Rawool
Moving from Java to Kotlin
Urs Peter
Typed Security: Preventing Vulnerabilities By Design
Michael Koppmann
Route from Java to Kotlin
Christian Woerz
A Guide To Functional Programming
Jemima Abu
Why Kotlin is the better Java and how you can start using it
Iris Hunkeler
Functional Programming in C++
Jonathan MĂĽller
F#, path to functional enlightenment
Onur Gumus
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.



DIGIMONDO GmbH
Hamburg, Germany
Remote
Senior
Java
JIRA
React
Kotlin
+4

Deutsche Bank
Charing Cross, United Kingdom
Remote
Java
React
DevOps
Kotlin
+6

Bikeleasing-Service GmbH & Co. KG
Berlin, Germany
Remote
Senior
PHP
API
Java
React
+8

Bikeleasing-Service GmbH & Co. KG
Berlin, Germany
Senior
PHP
API
Java
React
Vue.js
+8

Haufe-Lexware GmbH & Co. KG
Freiburg im Breisgau, Germany
Remote
API
Java
Scrum
Kotlin
+4


Interactivated Solutions Europe
Groningen, Netherlands
Remote
Intermediate
REST
Kotlin