Duncan McGregor
Still coding after all these years
Duncan has been a professional software developer for over 30 years now. He was lucky enough to be an early adopter of Object Oriented programming, which was the gateway drug to patterns and Extreme Programming, and more recently functional programming in Kotlin. These days he still writes code for a living, coauthored Java to Kotlin: A Refactoring Guidebook, is a Google Developer Expert, and publishes a weekly YouTube video on Kotlin.
He will try almost anything in his quest for better software, including, but not limited to, actually talking to people.
Mastering Kotlin Refactoring – Tools and Techniques
The needs of a codebase change over time. We have to implement new features that weren’t anticipated when the product was first designed, changing existing code to model a combination of old and new behaviors. Refactoring is an essential skill that allows us to accommodate new requirements without ever-increasing complexity.
Duncan McGregor and Nat Pryce are authors of the book “Java to Kotlin: A Refactoring Guidebook”. Join them in this workshop to continue the journey. Together, you will refactor a web application from Kotlin to even better Kotlin, combining language features to ensure greater type safety, more explicit data flow, and a clear architecture.
In this workshop, you’ll learn how to:
- Master the IntelliJ Platform’s Kotlin refactoring tools.
- Devise a test strategy to safely refactor with confidence.
- Plan multistep refactorings so that code continues to build and run.
- Migrate from mutable objects to immutable data classes, functions, and state machines modeled with sealed class hierarchies.
- Migrate a layered or Hexagon software architecture to - Functional Core, Imperative Shell.
- Use AI to improve refactoring productivity.
Refactoring to Expressive Kotlin
Kotlin was built from the beginning as an expressive language, but we still scratch our heads when reading some code, especially if it is trying to do something complicated.
Join Duncan and Dmitry as they examine code examples and use the power of the Kotlin language and IntelliJ to refactor them into code that reads as it works. We’ll learn how to express intent with the scope functions: let, run, with, apply, and also. We’ll see how defining our own extension functions allows code to flow, and move on to more advanced topics like separating pure from impure functions, cohesion, tiny types and domain specific languages.