Technical Debt, Rewrites, and Refactoring
⛑ My First Aid Kit can help you rescue any codebase quickly and safely!
On April 14, 2021, I co-organized the 5th edition of The Legacy of SoCraTes with my partner in crime Adrian Bolboacă.
It’s a half-a-day remote conference where 5 speakers share their tips to deal with Legacy Code.
For this edition, we focused on prioritizing Tech Debt and learning a better way to approach “rewrite” projects. I had the pleasure to host Adam Tornhill, Sabrina Leandro, and Clare Macrae. I also gave a talk myself! More on that below 👇
As usual, we recorded all the talks so you can watch them now and share them with your friends and colleagues!
Adam Tornhill made me discover the incredible power of behavioral analysis. With Software Design X-Rays, Adam explains how you can get quick insights from very large codebases, leveraging the information present in version control metadata.
This talk is a sneak peek of all of this. Using CodeScene, Adam explains how you can prioritize Technical Debt in a way that will make sense for the business.
If you’re familiar with my blog, you may already know that I advocate for constant, progressive refactorings. It’s safer and pays off faster.
But what if you’re already working on a rewrite project? You probably can’t just stop everything and start over. Sabrina Leandro talks about such a situation, from her own experience.
She also gave precious advice to avoid the risk of such projects again. As she said:
A refactoring a day keeps the rewrite away!
I took the opportunity of the conference to present my talk. In this talk, I share 7 techniques to deal with Legacy Codebases.
Advice on working with existing and untested codebase are scattered around. I’ve been hunting for them, to try them and share what worked best for me. Here, I wanted to show you 7 different techniques you could try on your own:
- Architecture Decision Records (ADRs)
- The Brain Dump
- The Mikado Method
- Hotspots Analysis
- Approval Testing
- Coding Katas
If you are looking for more, I’ve written a survival kit with 14 detailed techniques for when tests are missing and deadlines are short: understandlegacycode.com/first-aid-kit ⛑
Finally, Clare Macrae presented a topic that is overlooked by developers (in my experience): letting tools do the work for you!
You see, when the code you need to change has no test, any change is risky. But sometimes, you first need to change the code before you can even add tests! That’s the paradox of Legacy Code.
How do you safely refactor code when you have no tests? Turns out, your IDE can probably do it for you!
Clare shows you a couple of examples of what you can achieve. Of course, it depends on your language and tooling. But I recommend you look for what your IDE can do for you. In general, it will refactor the code faster and more safely than you ever could!
☝ Oh, by the way! If you’re doing JS/TS and you use VS Code, I’m building an extension to help you do that. Check it out: Abracadabra.
There’s no fixed schedule, but I like to organize this short conference every few months. I reach out to a few speakers to build an interesting agenda, then we set up the event.
Everything is FREE. Attending is the opportunity to directly ask questions to these speakers, from the comfort of your home.
If that’s something you want to hear about, subscribe to my newsletter below 👇
I publish my monthly tips on Legacy Code here. I also tell my subscribers in advance about the conference and the agenda, so they don’t miss out. Join them!