Size Oriented Metrics
LOC Metrics
It is one of the earliest and simpler metrics for calculating the size of the computer program. It is generally used in calculating and comparing the productivity of programmers. These metrics are derived by normalizing the quality and productivity measures by considering the size of the product as a metric.
Following are the points regarding LOC measures:
- In size-oriented metrics, LOC is considered to be the normalization value.
- It is an older method that was developed when FORTRAN and COBOL programming were very popular.
- Productivity is defined as KLOC / EFFORT, where effort is measured in person-months.
- Size-oriented metrics depend on the programming language used.
- As productivity depends on KLOC, so assembly language code will have more productivity.
- LOC measure requires a level of detail which may not be practically achievable.
- The more expressive is the programming language, the lower is the productivity.
- LOC method of measurement does not apply to projects that deal with visual (GUI-based) programming. As already explained, Graphical User Interfaces (GUIs) use forms basically. LOC metric is not applicable here.
- It requires that all organizations must use the same method for counting LOC. This is so because some organizations use only executable statements, some useful comments, and some do not. Thus, the standard needs to be established.
- These metrics are not universally accepted.
Based on the LOC/KLOC count of software, many other metrics can be computed:
- Errors/KLOC.
- $/ KLOC.
- Defects/KLOC.
- Pages of documentation/KLOC.
- Errors/PM.
- Productivity = KLOC/PM (effort is measured in person-months).
- $/ Page of documentation.
Advantages of LOC
- Simple to measure
Disadvantage of LOC
- It is defined on the code. For example, it cannot measure the size of the specification.
- It characterizes only one specific view of size, namely length, it takes no account of functionality or complexity
- Bad software design may cause an excessive line of code
- It is language dependent
- Users cannot easily understand it
|