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
Matching moments
09:38 MIN
Using Kotlin Coroutines to simplify complex reactive code
Back(end) to the Future: Embracing the continuous Evolution of Infrastructure and Code
46:13 MIN
Audience Q&A on Kotlin features and learning resources
Route from Java to Kotlin
00:02 MIN
Introduction to Kotlin and its Java interoperability
Route from Java to Kotlin
32:54 MIN
Achieving interoperability between Java and Kotlin code
Why Kotlin is the better Java and how you can start using it
05:03 MIN
Refactoring Kotlin code to eliminate nulls with sealed classes
Java Sealed Classes vs. Kotlin Sealed Classes #Slideless
41:25 MIN
Q&A on type systems and legacy code
Typed Security: Preventing Vulnerabilities By Design
21:10 MIN
Discovering critical challenges in Kotlin Native
Kotlin Multiplatform - True power of native code reuse
11:45 MIN
Managing code complexity and common development styles
Breaking the Bug Cycle: TDD for the Win
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
From learning to earning
Jobs that call for the skills explored in this talk.

Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd)
Vesterling Consulting GmbH
Remote
€55-80K
Intermediate
Scrum
Spring
Kotlin
+4

Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd)
Vesterling Consulting GmbH
Remote
€55-80K
Intermediate
Scrum
Spring
Kotlin
+4

Kotlin Software-Entwickler | Kotlin, Datenbanken, Frameworks, SCRUM | bis 60% Home-Office (mwd)
Vesterling Consulting GmbH
Remote
€55-80K
Intermediate
Scrum
Spring
Kotlin
+4

Full-Stack Developer Kotlin & TypeScript
Bikeleasing-Service GmbH & Co. KG
Senior
PHP
API
Java
React
Vue.js
+8

Software Engineer II, Full stack (Kotlin/ReactJS) - (Payment, Fintech)
Delivery Hero AG
Java
React
Kotlin
Node.js
PostgreSQL
+5

(Senior) Fullstack Software Engineer (Java/Kotlin/Python/JavaScript) (onsite / remote in Germany)
Scalable GmbH
Remote
Senior
Java
React
Python
Kotlin
+7

(Senior) Fullstack Software Engineer (Java/Kotlin/Python/JavaScript) (onsite / remote in Germany)
Scalable GmbH
Remote
Senior
Java
React
Python
Kotlin
+7

Product Owner und Backend-Entwickler Java/Kotlin
inexogy smart metering GmbH & Co. KG
Java
MySQL
Scrum
Kotlin
Docker
+1
