Understand Legacy CodeChange Messy Software Without Breaking It

AI Support

Can AI help me tame legacy codebases?

With the development of AI and the rise of ChatGPT, this is a relevant question to ask. Sure, it can generate new code you have to maintain. But can it help you maintain existing code?

🎥 Talks

🧰 Tools

There are many tools popping up around, here are some I want to highlight:

  • CodiumAI can help you generate tests on existing code. I gave them a hand on the VS Code extension in early 2023.
  • Rubberduck for VS Code. I also contributed to this one. It's an open-source extension that can be an helpful assistant.
  • Denigma which seems to be really good at explaining what spaghetti code is doing.

🔬 Studies

Here are interesting studies related to the usage of AI to deal with existing codebases:

  • Refactoring vs. Refuctoring by CodeScene. They figured that LLMs will generally introduce a regression when attempting to refactor complex code. But coupled to a fact-checking validation step, tooling could leverage these and only suggest the ones that actually work. This is promising because it would unlock more powerful automated refactorings.
  • Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructions.This one concludes that it's a good idea to train models on the codebase commits. Also, closed and distilled models seem to be doing a better job than open ones. Finally, the more specific the instructions, the better.

🎓 Related articles

Nicolas Carlo

Written by Nicolas Carlo who lives and works in Montreal, Canada 🍁
He founded the Software Crafters Montreal community which cares about building maintainable softwares.