Modernisation of systems: From dragons to AI

In the hands of an experienced developer who stays in control, artificial intelligence is a remarkable leap forward in what can be achieved.
Lorraine Steyn
By Lorraine Steyn
Johannesburg, 21 Oct 2024
Lorraine Steyn, founder and CEO of KRS Software.
Lorraine Steyn, founder and CEO of KRS Software.

Modernising legacy systems is a strategy of extending the useful life of existing systems, but it is difficult work with the challenges it presents.

The issue for development teams is that legacy systems are usually large and monolithic in design, and developers are wary of changing code they are unfamiliar with. “Here be dragons,” as it is often referred to!

Enter the age of artificial intelligence (AI) − a technological advance that impacts and influences various aspects of our work and personal lives.

AI is particularly good at code-related jobs, as the large language models have been trained on billions of lines of publicly available code. The AI can recognise code patterns and assist in refactoring the code base to newer, more maintainable standards.

AI should be seen as the “extra pair of hands” doing tedious and repetitive edits in the hands of an experienced developer.

Some early tools are emerging that allow sophisticated specifications to be given to the AI to make code changes, and I expect to see more AI coding tools emerge over the next year. Example usage would be upgrades for development language versions with breaking changes. You can find and fix the breaking changes more flexibly with AI than with traditional editing techniques.

We need to be constantly aware that current AI lacks understanding of the language it spews so proficiently.

As software development professionals, we cannot ignore the fact that we must deal with the changing demands of business, the management of ever-increasing amounts of data, and deal with scarcity of technical skills and talent of development teams.

How do we maintain or adapt our systems to counter these risks and challenges? Do we refactor or rewrite?

There is much debate about whether legacy systems should be refactored or rewritten. Based on my experience in technology that spans four decades, I would always advise a modular and stepwise process. This may ultimately result in a rewrite but looks very much like refactoring while it is in progress.

The biggest challenge of taking a modular approach to monolithic systems is identifying modules and uncoupling the system into the modular architecture that enables the team to work on small areas of functionality without impacting everything else. AI can assist in two ways:

Firstly, by analysing the code for complexity and suggesting improvements. This extends the complexity metrics that we have had for a long time with more specific suggestions and assistance in cleaning up code.

Secondly, by creating automated tests that serve as a safety barrier that the team needs to know that their changes are correct and will not impact users.

AI is really great at writing tests with very little developer input. Tests are important for developers because they help make sure that any changes to the system do not cause new problems or hurt users.

Writing these tests by hand can take a lot of time, but AI is great at making detailed test cases with some help from the developers. This saves time and boosts productivity. It lets developers work on more important tasks, while still making sure their changes are checked carefully.

To sum up, AI cannot do everything for us! We need to be constantly aware that current AI lacks understanding of the language it spews so proficiently.

However, in the hands of an experienced developer who stays in control and uses AI as a tool, it is a rather remarkable leap forward in what can be achieved.

As AI keeps improving, its role in updating legacy systems will become crucial in helping development teams and businesses stay ahead in the tech world. But keep in mind that it works best when combined with human knowledge.

Use it as an enabling tool that can help skilled developers better handle the complexity of old systems more easily, leading to more dependable and easier-to-maintain solutions.