Software Metrics: Lord Kelvin, A Physicist
Software Metrics: Lord Kelvin, A Physicist
1.
Software Metrics
Product vs. process Most metrics are indirect:
No way to measure property directly or Final product does not yet exist
For predicting, need a model of relationship of predicted variable with other measurable variables. Three assumptions (Kitchenham)
1. We can accurately measure some property of software or process. 2. A relationship exists between what we can measure and what we want to know. 3. This relationship is understood, has been validated, and can be expressed in terms of a formula or model.
Few metrics have been demonstrated to be predictable or related to product or process attributes.
Code
Static
Dynamic
Cost
Duration, time
Staffing
Code Metrics
Estimate number of bugs left in code.
Claimed to be a measure of testing diffiiculty and reliability of modules. McCabe recommends maximum V(G) of 10.
Assumptions:
Seeded faults equivalent to inherent faults in difficulty of detection. A direct relationship between characteristics and number of exposed and undiscovered faults. Unreliability of system will be directly proportional to number of faults that remain. A constant rate of fault detection.
Most requirements written in terms of operational reliability, not number of bugs. Alternative is to estimate failure rates or future interfailure times.
Software Uncertainty
Assumption: The mechanism that selects successive inputs during execution is unpredictable (random).
Input space I
IF
Program p
OF
Output space O
Execution time in seconds between successive failures. (Read left to right in rows).
2400 2200 2000 1800 1600 1400 1200 1000 800 600 400 200 40 50 60 70 80 90 100 110 120 130 LV JM
Different models can give varying results for the same data; there is no way to know a priori which model will provide the best results in a given situation. The nature of the software engineering process is too poorly understood to provide a basis for selecting a particular model."
Number of requirements errors found (to assess quality) Change request frequency
To assess stability of requirements. Frequency should decrease over time. If not, requirements analysis may not have been done properly.
Common measures:
More objective.
Difficult to estimate until code actually produced.
Amount of object code generated dependent on high-level language programming style.
Management Metrics
Techniques for software cost estimation
1. Algorithmic cost modeling: Model developed using historical cost information that relates some software metric (usually lines of code) to project cost. Estimate made of metric and then model predicts effort required. The most scientific approach but not necessarily the most accurate. 2. Expert judgement 3. Estimation by analogy: useful when other projects in same domain have been completed.
Relies on the quantification of some attribute of the finished software product but cost estimation most critical early in project when do not know this number.
Lines of code: very difficult to predict or even define. Function points: - Heavily biased toward a data processing environment - Assessment of complexity factors leads to wide variations in estimates.