How many programmers does it take to maintain previously written code?

Some time ago, a conversation took place between me and a good friend of mine, in which the following phrases were heard:

- The number of programmers will constantly grow - after all, the amount of code is growing, and more and more developers are constantly required to support it.
- But the code is getting old, part of it is leaving support. Even the presence of some kind of balance is not ruled out.

Remembering them a few days later, I wondered if code maintenance, requiring more and more resources over time, could ultimately paralyze the development of new functionality, or would it require an unlimited increase in the number of programmers? Mathematical analysis and differential equations helped to qualitatively assess the dependence of the amount of support on development and find answers to questions.

Question one. Can support "eat" all development resources?

Consider a team of programmers in which the number of participants is constant. Share of their working time How many programmers does it take to maintain previously written code? (How many programmers does it take to maintain previously written code?) falls on the development of new code, and the remaining fraction of the time How many programmers does it take to maintain previously written code? goes to support. Within the assumptions of the model, we assume that the first type of activity is aimed at increasing the amount of code, and the second one is aimed at changing it (correcting errors) and does not have a significant impact on the amount of code.

We denote by How many programmers does it take to maintain previously written code? the entire amount of code written up to the point in time How many programmers does it take to maintain previously written code?. Assuming the speed of writing code is proportional How many programmers does it take to maintain previously written code?, we get:

How many programmers does it take to maintain previously written code?

It is natural to assume that the labor costs for maintaining the code are proportional to its volume:

How many programmers does it take to maintain previously written code?

or

How many programmers does it take to maintain previously written code?

Whence

How many programmers does it take to maintain previously written code?

We obtain a differential equation that is easily integrated. If at the initial time the code size is zero, then

How many programmers does it take to maintain previously written code?

RџSЂRё How many programmers does it take to maintain previously written code? function How many programmers does it take to maintain previously written code?, How many programmers does it take to maintain previously written code?. And this means a gradual reduction over time of the development of new functionality to zero and the transition of all resources to support.

However, if in time How many programmers does it take to maintain previously written code? code becomes obsolete and no longer supported, then the amount of code that needs support at a point in time How many programmers does it take to maintain previously written code? equals already How many programmers does it take to maintain previously written code? Then

How many programmers does it take to maintain previously written code?

How many programmers does it take to maintain previously written code?

а How many programmers does it take to maintain previously written code? is a solution of a differential equation with a retarded argument [1]:

How many programmers does it take to maintain previously written code?

The solution of such an equation is uniquely determined by setting the values How many programmers does it take to maintain previously written code? "before the beginning of time" How many programmers does it take to maintain previously written code?. Since no code has been written before the initial time, in our case How many programmers does it take to maintain previously written code? with How many programmers does it take to maintain previously written code?.

Let's look at a few examples. We will measure time in years, and the amount of code in thousands of lines. Then for How many programmers does it take to maintain previously written code? values ​​of the order of tens are acceptable, we will take 50 and 100. That is, in a year the development team will write fifty and one hundred thousand lines of code, respectively. For How many programmers does it take to maintain previously written code? acceptable values ​​are: How many programmers does it take to maintain previously written code?, How many programmers does it take to maintain previously written code?, How many programmers does it take to maintain previously written code?. This means that a development team is able to maintain the amount of code it writes in a year while being a quarter, half, or full time job. As the average lifetime of the code, let's set the values: 1, 2 and 4 years. Solving the equation numerically, we obtain examples of the behavior of the function How many programmers does it take to maintain previously written code? for some combinations of parameters How many programmers does it take to maintain previously written code?.
How many programmers does it take to maintain previously written code?
The nature of the behavior of the function How many programmers does it take to maintain previously written code? in terms of aging code has changed. The function has ceased to be monotonous, but the fluctuations “calm down” with time, there is a tendency to strive How many programmers does it take to maintain previously written code? to some constant value. Graphs show: the more How many programmers does it take to maintain previously written code?, How many programmers does it take to maintain previously written code? и How many programmers does it take to maintain previously written code?, that is, the slower the code ages, the faster the development of new code and the lower the quality of the code, the less resources will remain for the development of new functionality. There was a desire to give at least one example in which How many programmers does it take to maintain previously written code? “snuggled” close to zero. But this required the selection of very poor development quality indicators and long-lasting code. Even on the lower left graph, a tangible amount of resources remains for the new functionality. Therefore, the correct answer to the first question is rather this: theoretically - yes, it is possible; practically unlikely.

Questions that could not be answered:

  1. Is it true that How many programmers does it take to maintain previously written code? tends to a certain limit How many programmers does it take to maintain previously written code? all How many programmers does it take to maintain previously written code?? If not for everyone, then for what?
  2. If there is a limit, how does its value depend on How many programmers does it take to maintain previously written code??

Question two. Can code maintenance cause an unlimited growth in the number of programmers?

We denote by How many programmers does it take to maintain previously written code? the number of programmers involved in developing new code. As above How many programmers does it take to maintain previously written code? - the amount of code written by the time How many programmers does it take to maintain previously written code?. Then

How many programmers does it take to maintain previously written code?

Keep the code busy How many programmers does it take to maintain previously written code? programmers. Taking into account the aging code,

How many programmers does it take to maintain previously written code?

Whence

How many programmers does it take to maintain previously written code?

If How many programmers does it take to maintain previously written code?then

How many programmers does it take to maintain previously written code?

Thus, the answer to the second question is negative: if the number of developers of new code is limited, then in the conditions of code aging, support cannot cause an unlimited increase in the number of programmers.

Conclusion

The considered models are "soft" mathematical models [2]. They are very simple. Nevertheless, the dependence of the simulation results on the values ​​of the parameters corresponds to what is expected for real systems, which speaks in favor of the adequacy of the models and sufficient accuracy to obtain qualitative estimates.

References

1. Elsgolts L.E., Norkin S.B. Introduction to the theory of differential equations with deviating argument. Moscow. Publishing house "Science". 1971.
2. Arnold V.I. "Hard" and "soft" mathematical models. Moscow. Publishing house MTSNMO. 2004.

Source: habr.com

Add a comment