Refactoring to Kotlin
If you're a Java developer who hasn't yet made the leap to Kotlin, this workshop is for you. Working as a group, we'll take existing Java code, convert it with a single IntelliJ command, and then refactor the results to idiomatic Kotlin. We'll see how to take advantage of the language to make code smaller, faster and more expressive, whilst at the same time interoperating with your existing application and Java libraries. In the afternoon we'll move from the prepared exercises to your code, working together to apply the techniques and insights from the morning to real codebases with real constraints. So if you have some code you'd like to start migrating, bring it along on a laptop with IntelliJ installed
Exploring the Kotlin type hierarchy from top to bottom
Coming from Java, Kotlin's type system can appear quite daunting: nullable types, Unit, Nothing, Any, variance specifiers, function types, and more. But don't panic! Kotlin's type hierarchy is actually simple – it has very few rules to learn and those rules combine together consistently and predictably. Thanks to those rules, Kotlin useful language features, such as null safety and unreachable code analysis, do not rely on special cases that you must memorise, or ad-hoc checks in the compiler and IDE that stop working when your code gets too complicated.
In this talk Nat will take you on a tour of Kotlin's type hierarchy and demonstrate how to use it to model your application domains, using example code taken from real projects.
The Changing Grain of Kotlin
A programming language, like wood, has a ”grain”. In both programming and carpentry, when you work with the grain, things go smoothly; when you work against the grain, things are more difficult.
A language's grain forms as its designers and users learn how language features interact, and encode their understanding and preferences in libraries and tools. It changes over time, as new language features don’t just add to the language, they interact with existing features. The new features change the relative value of the old features.
Join Nat and Duncan, authors of Java to Kotlin: A Refactoring Guidebook, as they explore the grain of Kotlin, tracing its evolution from the first released version through to the present day. They will show how their coding style became outdated as the language changed, how they modernized it, and why it is important to refactor existing code to make the most of the changing grain.
Mistakes Made Adopting Event Sourcing (and how we recovered)
Over the last year or so we have been building a new system that has an event-sourced architecture. Event-sourcing is a good fit for our needs because the organisation wants to preserve an accurate history of information managed by the system and analyse it for (among other things) fraud detection. When we started, however, none of us had built a system with an event-sourced architecture before. Despite reading plenty of advice on what to do and what to avoid, and experience reports from other projects, we made some significant mistakes in our design. This talk describes where we went wrong, in the hope that others can learn from our failures.
But it’s not all bad news. We were able to recover from our mistakes with an ease that surprised us. I’ll also describe the factors that allowed us to easily change our architecture, in the hope that others can learn from our successes too.
Failure is not an Option - error handling strategies for Kotlin programs
Kotlin largely inherits Java's exception mechanism, but exceptions and functional programming are uneasy bedfellows, leading to most projects adopting "a wing and a-prayer" as their error handling strategy.
I needn’t be so ad-hoc though. In this session we compare and contrast different techniques for handling errors in Kotlin programs. We will discuss the sweet spots, pitfalls and trade-offs encountered in each technique, illustrated with examples from real projects.
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top