Software metric
From Free net encyclopedia
A software metric is a measure of some property of a piece of software or its specifications.
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 Projects: Management, Measurement and Estimation.
Contents |
Common software metrics
Common software metrics include:
- order of growth (See Analysis of algorithms in terms of Asymptotic analysis and Big O notation)
- source lines of code
- cyclomatic complexity
- function points
- bugs per line of code
- code coverage
- number of lines of customer requirements.
- number of classes and interfaces
- Robert Cecil Martin's software package metrics
- Cohesion
- Coupling (computer science)
Limitations
The assessment of "how much" software there is in a program, 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 program 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
Criticisms
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 managers 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 be used well by everyone.
See also
References
- {{cite book
| last = DeMarco | first = Tom | authorlink = Tom DeMarco | year = | title = Controlling Software Projects: Management, Measurement and Estimation | edition = | pages = | publisher = | id = ISBN 0-131-71711-1
}}
External links
- http://www.cosmicon.com
- http://www.ifpug.org
- Article Estimating With Use Case Points from Methods & Tools describes the process to measure the size of an application modeled with UML, using use cases.
- http://www.geronesoft.com - Articles on actual code counting results and a tool for measuring code counts in various computer languages
Template:Soft-eng-stubit:Metriche software de:Softwaremetrik pt:Métricas de software