Encyclopedia > Software metric

  Article Content

Software metric

A software metric is a measure of some property of a piece of software or its specification.

Since quantitative methods have proved so powerful in the other sciences, Computer Science practitioners and theoreticians have worked hard to bring similar approaches to software development. Tom DeMarco stated, You cannot control what you cannot measure in Controlling Software Development(?).

Common software metrics include:

Software Metrics can be used to

  • estimate project budget and schedule
  • evaluate individual productivity and quality
  • evalaute project productivity and quality.

Table of contents

Rules of Thumb

There are a few rules of thumb, although these numbers vary widely.

  • Commercial programmers write about 12,000 lines of code per year.
  • Government programmers write about 1,500 lines of code per year, because they do a lot more process and paperwork.
  • Commercial programmers deliver about 0.5 bugs per thousand lines of code for standard commercial code, with testing departments and so on.
  • Government programmers do not report their bugs. (???)


The assessment of "how much" software there is in a programme, especially making prediction of such prior to the detail design, is very difficult to satisfactorily define or measure. The practical utility of software metrics has thus been limited to narrow domains where the measurement process can be stabilised.

Management methodologies such as the Capability Maturity Model or ISO 9000 have therefore focused more on process metrics[?] which assist in monitoring and controlling the processes that produce the software.

Examples of process metrics affecting software:

  • Number of times the programme failed to rebuild overnight
  • Number of defects introduced per developer hour
  • Number of changes to requirements
  • Hours of programmer time available and spent per week
  • Number of patch releases required after first product ship.


Potential weaknesses and criticism of the metrics approach:

  • Unethical: It is said to be unethical to reduce a persons performance to a small number of numerical variables and then judge them by that measure. A supervisor may assign the most talented programmer to the hardest tasks on the project; they then take the longest and generate the most defects. Uninformed manager's overseeing the project might then judge the programmer as performing poorly without consulting the supervisor who has the full picture.

  • Demeaning: 'Management by numbers' without regard to the quality of experience of the employees, instead of 'managing people'.

  • Skewing: The measurement process is biased by the act of measurement by employees seeking to maximise management's perception of their performance. For example, if lines of code is used to judge performance, then employees will write as many separate lines of code as possible, and if they find a way to shorten their code, they may not use it.

  • Inaccurate: No known metrics are both meaningful and accurate. Lines of code measure exactly what is typed, but not of the difficulty of the problem. Function points were developed to better measure the complexity of the code or specification, but they require personal judgement to use well. Different estimators will produce different results. This makes function points hard to use fairly and unlikely to used well by everyone.

See Also

Software engineering Computer science


All Wikipedia text is available under the terms of the GNU Free Documentation License

  Search Encyclopedia

Search over one million articles, find something about almost anything!
  Featured Article
David Binning Monro

... was a grandson of Alexander Monro, tertius (1773-1859), professor of anatomy in Edinburgh University, whose father, Alexander Monro, secundus (1733-1817), ...