Monday, 17 October 2011

Are lines-of-code (LOC) a useful productivity measure?


Not unless you are very careful. Capers Jones' book has a detailed and insightful discussion of Lines of Code, including anomalies, and shows how to use it sensibly (eg in a single job shop, with a single language, and a standard company coding style). It is easy to cook up anomalies where LOC gives different numbers for code written in different styles, but pathological cases should get caught in code inspections. References:

·  T. Capers Jones, Programming Productivity, McGraw-Hill, New York, 1986

·  Capers Jones, Applied Software Measurement: Assuring Productivity and Quality, McGraw-Hill, Inc., 1991, 494 pages ISBN 0-07-032813-7

The appendices of the latter give rules for counting procedural source code, as well as rules for counting function points and feature points. The following study, cited in Boehm's Software Engineering Economics, claims that anomalies that seriously "fool" the LOC metric show up rarely in real code.
·  R. Nelson Software Date Collection and Analysis at RADC, Rome Air Development Center, Rome, NY. 1978.

No comments:

Post a Comment