There is a project written in borland builder c ++ 6.
It is required to alter the code under msvc 2015, i.e. essentially do refactoring.
The amount of code is known. Let's say a total of 3 MB (this is without resources: icons, pictures, etc. - pure code).

Tell me, what are the best practices for determining the lower limit of the cost of refactoring (in any units: man-hours, monetary units - whatever).

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer to the participants of VenZell , cheops , aleksandr barakin , user194374, PashaPash ♦ Jun 16 '16 at 11:13 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • the bottom one is 0?) If this is a console application without using specific libs and by all standards. But you don’t need it) - pavel
  • @pavel spec. no, graphical program, i.e. VCL interface - gecube 6:36 pm

1 answer 1

Heuristic algorithm for a single developer

Note: Suppose that 3Mb is approximately 80 tons of lines of code.

  1. We begin to do refactoring and do it for, say, 4 hours.
  2. We count the number of lines of code that we managed to process during this time.
  3. We divide this number by 4h, we get a rough estimate of X lines per hour.
  4. We calculate the total number of hours by dividing 80000 / X, y getting Y hours.
  5. The resulting value must be multiplied by the "coefficient of the developer" from about 0.5 to 4, in order to reserve time for unforeseen difficulties. Those. let's say an optimistic developer estimated the task for 10 hours, and in fact it turned out 25 hours of which 15 hours were spent on unforeseen difficulties in the process, then the coefficient would be equal to 2.5 for this task.
  6. Well, to the hours obtained in the course of these calculations, it is necessary to add another percentage “just for fire”, say 15% of the received number.

For example

  1. In 4 hours, let's say it’s possible to process 250 lines.
  2. 250/4 ~~ 62str / h.
  3. 80000/62 ~~ 1290h
  4. Let the coefficient be 3. 1290 h * 3 = 3870 h.
  5. And from 15% there will be 4450.5 hours.
  6. 4450.5h is about 111 people / weeks, i.e. about 2 people / years.

Well, and knowing the man-hours, to calculate the monetary units is a trivial task.

  • one
    Super! Thank. I was expecting, of course, a theoretical method, but this is also a ride. The problem is that in practice it will not be possible to allocate 4 hours, and with the norms of salary they will already fly out to a minimum loss of 3 tr, but for the sake of the project at 50-100 tr. You can also try. It is also clear that it is pointless to take a small time interval, since the error will be huge. - gecube