In most modernization projects, issues with code quality are addressed at the end to simplify the migration process. However, our experience shows that sniffing out and dealing with bad code early on has many benefits.

In many of the migration projects that we take on, our customers prefer to migrate their legacy applications “as is”, with plans to improve the quality of their code at a later time. However, there are a couple of risks associated with this approach —mainly that migrating bad code can make the migration more challenging, and that plans for improving code quality tend to become eclipsed by other operational concerns after the migration and are seldom realized as time goes by.

When we migrated mBank’s central banking system (CBS) from an old technological stack to the .NET Framework, we addressed code quality issues early on by 1) adding bad smell detection and remediation as part of the normal development process, 2) adding unit and functional test frameworks for code quality improvements, and 3) performing bad smell removal during code transformation to .NET.

The result of this study is a very clear picture of how prioritizing code quality is a migration enabler that results in significant benefits early in the project, produces code that is far easier to maintain, and greatly contributes to the overall success of the migration project.

More details can be found in the full paper, “Quality First! A Large Scale Modernization Report”, which will be presented at the 26th IEEE International Conference on Software Analysis, Evolution, and Reengineering in Hangzhou, China February 24 – 27, 2019.