Have you ever found yourself hesitating before changing legacy code? You’re not alone. “Legacy Code” is by definition code we are afraid to touch. We’re afraid to touch it because it’s complex, no one touched it for a long time, we’re not sure exactly what it does and it doesn’t have automated tests.
In this workshop we’ll learn techniques and practices to over come this, transforming legacy code into tested, maintainable code. We’ll move from seeing legacy code as something frightening to an opportunity: opportunity to make code better, become more professional and enjoy every minute of it.
We will be using example code built especially for the workshop, based on our experience with client’s code bases, representing the most common challenges legacy code presents. We will be dealing with global variables, access to external APIs, long methods, long and complicated payloads of methods, endless conditionals and more.
The process we will use is to first do some safe refactoring in order to be able to cover the code with unit tests, add the required unit tests and then do some more refactoring to ready the code for the required enhancements. Eventually we will use TDD to make the required changes.
The workshop is intended for backend developers using object oriented languages. The exercises will be in C# but the relevance is same for Java developers. In case we will have a mass of Java developers in the course we will consider having the exercises in Java – let us know when registering.
Instructor: Yaki Koren