A manager’s role in preventing code rot
By Anujah Bosman, CEO, Chillisoft
Good code can rot quickly. Code rot or software entropy is well known in software development circles, but it is seldom understood by management. Management tends to support and focus on new functionality and features that are needed by the business, but there is very little time to invest in maintaining the existing code base.
Naively, management assumes the code that developers are working on is continuously maintained. It is also comfortable and easy for managers to ignore decaying code as long as the existing code continues to work. Code rot therefore insidiously grows and, over time, it rears its head suddenly when it becomes more difficult to add features and new functionality, or parts of the software stop working. Code rot also rears its head when a senior developer leaves, or when the business undertakes strategic initiatives such as digital transformation, performance improvements or moving to the cloud.
The reality is that management prioritises and funds urgent requests for new or adapted features. There is no time or allocated budget for addressing technical debt or time to refactor code. Developers are usually rewarded and recognised for the number of features they deliver. Tasks such as refactoring tackling technical debt are seldom on Kanban boards or in tools such as TFS. Refactoring is also made impossible in toxic, high stress, blame-driven environments. In such environments, no one is prepared to tackle the ball of spaghetti, in case “it breaks something”.
These development cultures and environments accelerate code rot, but the reality is that code rots from the head first, just like the saying: “A fish rots from the head first.”
Management and strong, consistent leadership are required to prevent code rot. We have to encourage developers to fix “broken windows” (ie, bad designs or code that no longer works). Encourage developers to consistently refactor, to write unit tests and to reduce the complexity of the code. Encourage developers to reduce dependencies and to make the time to address the aggregated decay. Encourage developers to take the time to go slowly so that they can go fast. Encourage a practice of clean code. Michael Feathers summarises clean code: “Clean code always looks like it was written by someone who cares. There is nothing obvious that you can do to make it better.”
If you recognise the symptoms of code rot and require assistance in reversing the code rot, please contact email@example.com. We understand that it is extremely expensive to rewrite software and that reversing code rot requires a wealth of software development experience.
In order to address this growing business need, Chillisoft has added a packaged software development offering of “reversing code rot” to augment our existing offering of “project rescue”. These offerings encompass Robert C Martin’s practices of clean code and clean architecture. Our reversing code rot offering entails untangling dependencies, uncovering and clarifying obfuscated code and business rules. It also ensures your code base has a decent test coverage. Reversing code rot allows you to reorganise your code base so it is maintainable and portable across different environments. Please contact Chillisoft today for a deeper discussion on reversing code rot and interventions to upskill and support your team to prevent code rot.