π Software Measurement: Size-Oriented Metrics
πΉ 1. Definition of Software Measurement
Software measurement is the process of quantifying different attributes of software such as size, complexity, effort, cost, and quality using numerical values.
π In simple words:
It means measuring software using numbers to understand and compare it better.
πΉ 2. Size-Oriented Metrics
πΈ Definition
Size-Oriented Metrics are software metrics that measure software based on its physical size, usually in terms of Lines of Code (LOC).
π In simple words:
They measure how big the software is.
πΉ 3. Common Size-Oriented Metric
πΈ Lines of Code (LOC) π
- Measures number of written code lines
- Includes executable statements
π Example:
- Small program = 500 LOC
- Large system = 50,000 LOC
πΉ 4. Key Size-Oriented Metrics
πΈ 1. Productivity π
Measures how much software is produced per unit effort.
Formula:
Productivity = LOC / Effort
π Example:
- 10,000 LOC / 20 person-months = 500 LOC/person-month
πΈ 2. Cost per LOC π°
Measures cost required to produce one line of code.
Formula:
Cost per LOC = Total Cost / LOC
πΈ 3. Defect Density π
Measures number of defects per unit size.
Formula:
Defect Density = Number of Defects / LOC
π Example:
- 50 defects / 10,000 LOC = 0.005 defects/LOC
πΈ 4. Documentation per LOC π
- Measures documentation size compared to code size
πΉ 5. Example of Size-Oriented Metrics
| Metric |
Value |
| LOC |
20,000 |
| Effort |
10 person-months |
| Cost |
$50,000 |
| Defects |
100 |
π Calculations:
- Productivity = 2000 LOC/person-month
- Cost per LOC = $2.5 per LOC
- Defect density = 0.005 defects/LOC
πΉ 6. Advantages of Size-Oriented Metrics
- Easy to understand
- Simple to calculate
- Useful for basic project comparison
- Helps in cost estimation
πΉ 7. Limitations of Size-Oriented Metrics β
- Depends on programming language (C vs Python)
- Does not measure functionality
- Encourages writing more code unnecessarily
- Not suitable for modern object-oriented systems
πΉ 8. Size-Oriented Metrics vs Function-Oriented Metrics
| Feature |
Size-Oriented |
Function-Oriented |
| Basis |
Lines of Code |
Functionality |
| Unit |
LOC |
Function Points |
| Accuracy |
LowβMedium |
Higher |
| Dependency |
Language dependent |
Language independent |
πΉ 9. Importance in Software Engineering
- Helps in early cost estimation
- Used for productivity measurement
- Useful in project comparison
- Helps managers track development effort
πΉ 10. Key Points for Exams
-
Based on Lines of Code (LOC)
-
Measures software size physically
-
Includes metrics like:
- Productivity
- Cost per LOC
- Defect density
-
Simple but not very accurate for modern systems
πΉ 11. Short Summary
- Size-oriented metrics measure software based on code size (LOC)
- They help in calculating productivity, cost, and defects
- Easy to use but language-dependent and less accurate
πΉ 12. Quick Exam Answer (2β3 lines)
Size-oriented metrics are software measurement techniques based on the physical size of software, usually measured in Lines of Code (LOC). They are used to calculate productivity, cost per LOC, and defect density, helping in basic project estimation.
πΉ 13. Likely Exam Questions
- Define size-oriented metrics.
- What is LOC in software measurement?
- Write formula for productivity.
- What are the advantages of size-oriented metrics?
- Differentiate between size-oriented and function-oriented metrics.
- What is defect density?
- Why are size-oriented metrics less accurate?