Xref: utzoo comp.software-eng:2450 comp.misc:7422 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!think!husc6!bu-cs!xylogics!world!madd From: madd@world.std.com (jim frost) Newsgroups: comp.software-eng,comp.misc Subject: Re: Programmer productivity Keywords: Programmer Productivity Metrics Message-ID: <1989Nov20.170957.19588@world.std.com> Date: 20 Nov 89 17:09:57 GMT References: Distribution: na Organization: Software Tool & Die Lines: 99 emuleomo@paul.rutgers.edu (Emuleomo) writes: >I heard that the average programmer produces 3-4 lines of *finished* >code a day! >This sounds ridiculously low. Does anybody out there know what the real >figure is? Or is it misleading to try and gauge productivity this way? I got the following information from Brooks' _Mythical Man Month_, pp. 90-94. This table was originally from John Harr of Bell Telephone Laboratories: Task | Prog Units | # prgmrs | Yrs | Man-yrs | Program Words | Words/yr -----------+------------+----------+-----+---------+---------------+--------- Operational| 50 | 83 | 4 | 101 | 52,000 | 515 Maintenance| 36 | 60 | 4 | 81 | 51,000 | 630 Compiler | 13 | 9 | 2.25| 17 | 38,000 | 2230 Translator | 15 | 13 | 2.5 | 11 | 25,000 | 2270 There are a couple of points which Brooks brings up with regards to this (and some other) data. First, programmer productivity drops quickly as the number of people that a programmer must communicate with increases. This follows the above data exactly. Second, productivity depends on the complexity of the task. The first two tasks above are control programs, the last two are translators. All four are of similar size, yet control program productivity averaged 500-600 words/man-year, while translators where over 2,200. Brooks says "[several examples of productivity] data all confirm striking differences in productivity related to the complexity and difficulty of the task itself". It is my belief that both points -- groups size and code complexity -- are reflected in the above data, although Brooks didn't look at this particular set of data that way. It would have been interesting to see what smaller groups could have done in the control programming tasks. Other data supplied by Brooks: IBM OS/360 showed 600-800 debugged instructions per man-year in control program groups, and 2000-3000 instructions per man-year in translator groups. These number are virtually identical to the above. MULTICS had a mean of 1200 PL/I statements per man-year, which is right about in the middle of both of the above data sets. Somebody is likely to note that "program words" doesn't correspond too well with "program lines". Brooks says: "[The MULTICS] number is *lines* per man-year, not *words*! Each statement in [the MULTICS] system corresponds to about three to five words of handwritten code! This suggests two important conclusions. o Productivity seems constant in terms of elementary statements, a conclusion that is reasonable in terms of the thought a statement requires and the errors it may include.(1) o Programming productivity may be increased as much as five times when a suitable high-level language is used.(2)" The footnotes are: (1) W.M. Taliaffero also reports a constant productivity of 2400 statements/year in assembler, Fortran, and Cobol. See "Modularity. The key to system growth potential," _Software_, 1, 3 (July 1971) pp. 245-257. (2) E.A. Nelson's System Development Corp. Report TM-3225, _Management Handbook for the Estimation of Computer Programming Costs_, shows a 3-to-1 productivity improvement for high-level language (pp. 66-67), although his standard deviations are wide. >what are the recommended ways to measure programmer productivity >using some sort of metrics! I recommend measuring productivity by whether or not the product works. It's the only measure which is always correct. Almost every other measure is easy to fake or won't give you a good idea of how much effort actually went into the result. In conclusion, 3-4 lines per day sounds about right. I suspect that small groups of people, such as those found in small software companies, do substantially better than that. This could be the result of paying much more attention to programmer ability than a large company working on a large project could do. In support of this theory, a highly-skilled three-man team I was working with wrote 27,000 lines of code in ten months, which is roughly 2.5 man-years, for an average of 10,800 lines per man-year or about 29 lines per man-day of fairly complex code. This code was not completely debugged and I considered the programming rate to be exceptionally high (read: we were killing ourselves to try to make a deadline). Fully debugged would likely have been closer to 15 lines per man-day. I consider these to be pretty much the highest numbers I'll ever see, the result of a close-knit group of skilled people, something which rarely happens in large industry. Hope this is useful, jim frost software tool & die madd@std.com