How to measure coding productivity?

You are a project director in the public services domain. The initial project time frame is 14 months. Your budget is short and you are asked to provide productivity metrics for each member of your development team.

Which metrics do you select?

On this project, the director decided that the selected metric will be the number of line of C code produced per day, and per developer.

Can you figure out what happened?

After one month of development, the metric showed a great variation from one developer to another. Once published, the metrics have triggered a poor-productivity developer hunt, ended by the dismissal of three developers.

Remaining developers were asked to increase their productivity according to a monthly given goal. Each month, poor-productivity developers have to explain their results in front of a dedicated bureau of investigation.

At the end of the 11th month

The status was
  • Productivity metrics were always reached.
  • Project director and enterprise management were proud of the results. The project lead is proven to be "under control".

At the end of the 14th month

The status was
  • Productivity metrics were still reached.
  • Project management was still satisfied.
  • Average developer turnover time on the project was 4 months.
  • Project has been delayed because of the incapacity to run the user acceptance test.

At the end of the 19th month

The status was
  • Productivity metrics were still reached.
  • Project management was very dissatisfied.
  • No developer accepts to work for this project.
  • Project is stuck, and still unable to run the user acceptance test.

At the end of the 23th month

The project has been killed, by an external audit, about code quality. Here are some excerpts of the audit report, translated from French to English
  • The volume of produced C code is gigantic [...] more than 400 000 files [...] The smallest project include header has a size of 34Kb [...] The largest has a size of 453Kb [...]
  • The number of C function, with a code volume exceeding 10 000 lines of code before processing is about 80.
  • We guess that developer skills were insufficient for this type of project [...] In particular, we do not understand why there is so few usage of programming language loop constructs, like for or while. [ ... ] Some code parts are weird. For example, on file
    consmgt.c
    , the same instruction i++; is reproduced continuously on 512 lines.
  • We are surprised of the ratio between the written code volume, and the compiled code volume. That's clearly better than commonly accepted standard ratios.
  • After code inspection, we can argue that maintenance will be really expensive, because of the lack of reuse between the different modules of the system [...]
  • Project is still unable to run the user acceptance test.

After the 24th month

An internal audit has showned
  • That the three fired developpers were the best of the team. Two of them have leaved the enterprise.