It is well-known that measuring the number of lines a programmer produces per year is a bad metric of his/her productivity.

For statistical purposes, I need a number of lines of lasting code a programmer touches annually. Here, a 'lasting' code line is a line that makes it into a released version, not just a beta version, and 'touching a line' means (reading and (deleting or modifying or adding)) the line. Notice that 'touching a line' is equivalent to ((reading and deleting) or (reading and modifying) or (reading and adding)). The term reading is difficult to count right, so I'm open to under- and overapproaximations of reading and X which are better than the trivial false ≤ (reading and X) ≤ X.

After getting the data, I would compute some average with error bars.

We are speaking about a programmer acting as a programmer, not as a reviewer who just reads someone else's code.

The used terms are, of course, imprecise. So please feel free to make them precise if you need that for your answer or to restrict them if your data is covering only a subindustry of software.

  • 2
    Programmer here. Just a note about the accuracy of the "have they read a line" part of the data. It is impossible to know if a programmer "read" a line, though you can use diff utilities to see if a line changed or was added or deleted. There are pretty good utils for that for many operating systems. We could have a long discussion about how to define "read a line" but I just wanted to add this quick note.
    – Bulrush
    May 15, 2016 at 14:55
  • I don't know how an under or over approximation would be done. If I use PGDN to scroll past 300 lines really fast to get to a certain point (because I don't like to lift my fingers to use control-g to goto a line), does that count as 300 lines read?
    – Bulrush
    May 17, 2016 at 14:07

1 Answer 1


I am not sure how you would determine lasting code, but not to sway you from trying, there are a couple of data-sets:

  1. tera-PROMISE is a research dataset repository specializing in software engineering research datasets.
  2. Eclipse Bug Data! is a dataset that is said to be able to trace errors to developer
  3. NASA Software results and analyses of the NASA Dataset Repository
  4. Open Hub provides analyses of open source information

The NASA dataset was big in the 2000's for analysis and coding algorithms.

This answer is essentially updating the previous version of this question: Open data sets about software development: code quality, defect rate, programming languages?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.