Your team needs a code down ambition

“Software is eating the world”. In his famous article written in 2011 Mark Andreessen wrote that “we are in the middle of a dramatic and broad technological and economic shift in which software companies are poised to take over large swathes of the economy”. He expected many more industries to be disrupted by software and was proven right. With recent breakthroughs in AI, we have not seen the end of all disruptions.

Mark Andreessen argued in favor of investing more heavily in software, recognizing the business value delivered. While the business benefits of software solutions are often recognized, software is expensive to create. Each 5K to 10K lines of code costs roughly 1 FTE to create. An average iphone app easily takes ~10-50K lines of code, a modern car uses 100M lines of code (source: code base sizes).

Software is also expensive to own. Even if there is no need to change functionality, the environment of the original software is subject to continuous change. New operating systems break functionality that worked perfectly for years. New hardware, even with the same features, requires software engineers to incorporate new drivers. With novel ways of breaching security, parts of the software need to be rewritten to be made secure. In my experience each 50K-200K lines of code needs roughly 1 FTE of maintenance on a yearly recurring basis.

If you have a 10 FTE team, creating between 50K and 100K LOC per year, you also have created the recurring need to sustain that code over the life time of that software. The first year, the team is super productive. The 2nd year they need part of their time to maintain the code they created in the first year 1 and so on. If you assume that maintenance is a function of code size, your innovation speed will move to zero! (i eleborate more on this in the gardeners dilemma)

There are several factors that make your code size larger than needed:

As the years go by, not all requirements that the team originally was asked to implement are still required. Software technologies that once where ‘hot and new’ are now obsolete and novel paradigms allow you to express the functionality in a more concise way. Often, software stacks contain abstraction layers that have lost their value. As a result, most code bases are much larger than needed. I gave examples of code that is bloated but still functional. It is also possible that the code stack contains code that is not in use anymore at all (dead code). While seemingly harmless, reusing dead code in a new context can have substantial adverse business effects. For an example, read this interview with Kevlin Henney who argues that dead code needs to be found and removed.

The more code you have, the more errors you have. This does not scale in a linear way. If you double the code, you more than double the errors.The end effect of writing too much code is that you spend more time on maintenance than necessary and do not give your stakeholders enough of what they need.

How to break the negative spiral? The first step is to recognize the importance of monitoring the size of your code. You need to embed this in the team culture. Establishing a ‘minimalistic code’ culture will keep your teams in control of their code base. They can spot unexpected code size increases and challenge themselves on finding opportunities to reduce. Setting their own targets will stimulate teams to find and remove dead code where possible.

For larger code sizes this is a multi-year endeavor. But starting the journey can save many FTE’s in maintenance. Here are some of the methods I have seen succeed in reducing legacy code size:

Software is eating the world. But maintaining a legacy software code base that is larger than needed is eating your innovation speed.You need a code size down target for your team!

Please let me know successful ways you used to reduce your code stack!

(Reblogged from https://www.linkedin.com/pulse/why-your-team-needs-code-down-target-dirk-jan-swagerman/)

KVK: 80546625

BTW: NL861710484B01