DDD EU 2020 - Scratching Refactoring: Unearthing your domain
By Barry O' Sullivan
DDD EU 2020 - Scratching Refactoring: Unearthing your domain
How do you deal with code that you don't understand? Not all code is well structured and easy to digest, most code isn't. It is our job to take this code and make changes without introducing bugs, and this is by no means an easy task. To make things harder, we actually want to improve this messy code, to refactor it into something more manageable. Well, the good news is that this is possible, you just need a foothold of understanding in that code, and Scratch Refactoring is that foothold. Scratch Refactoring is a technique that help us navigate and understand messy code, it's about trying out changes to code without committing to them, changes that could otherwise be expensive. It allows us to explore code and domain models without breaking the underlying code. The goal isn't to rewrite, it's to explore mental models of the underlying domain. This is very powerful when working with difficult code. This workshop will focus on Scratch Refactoring and how to apply it. We'll discuss the concept, look at techniques we can use to accelerate the process, different strategies for gaining clarity, and how tactical DDD patterns can be applied to explore potential domain concepts. Then we will apply these ideas to code we've brought in ourselves. That's right, we'll try out Scratch Refactoring on our own problem space. This is a great way to try out the technique in a domain or codebase