Aki Salmi – Refactoring Legacy Code – a true Story
Summary
This is a true story. Me getting an assignment to a project which had 0 tests. And no other developers.
Old, yet live code written in Java/Groovy/Grails. Intertwined responsibilities, messy code. Typical length of a class was hundreds of lines of code.
In the presentation, I’ll show two example cases of introducing new features to the project. The first is a story of adding a search criteria to a list of 15 parameters. Yes, there was 15 parameters in the method call.
The other example is total refactoring of handling files transferred to the system using FTP. It included both changes to the supported file types and the structure of the code.
In both examples, I try to think the end results (code) from both maintainability perspective and from business perspective.
Duration
40 minutes
Detailed Schedule
5min introduction to the system
10min case 1 -> adding a search criteria
20min case 2 -> FTP import for files
What you will learn?
One or two approaches for tackling legacy code with no tests.
- Some business impacts
Pre-requisites
None
What’s next?
Maybe reading book ‘Working with legacy code’.
Do the attendees need a laptop?
No
[…] year’s edition of I T.A.K.E. Unconference. A couple of sessions that I find interesting: Aki Salmi – Refactoring Legacy Code – a true Story and Martin Naumann – Open Data Wizardry […]