📘 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?