Advanced Topic 41 of 50 Software Engineering
Software Metrics
Measurements of size, complexity and quality.
How it works
Software metrics quantify properties of code, process and product. Code metrics include lines of code, cyclomatic complexity, coupling, cohesion, test coverage and duplication. Process metrics include velocity, cycle time, lead time, deployment frequency, change failure rate and mean time to recovery, the DORA measures. Product metrics track defects, performance, reliability and user satisfaction. Metrics should support decisions, not just be collected.
Step-by-step walkthrough
- Metrics turn qualities into numbers.
- Lines of code estimate size.
- Cyclomatic complexity counts decision paths.
- Coverage shows how much code tests execute.
- Defect rate tracks quality, but measure to learn, not to rank people.
Where it is used
Teams use dashboards and static analysis to spot risky code, track delivery health, set quality gates in CI and justify improvements.
Common pitfall
Goodhart's law applies: when a measure becomes a target, it stops being a good measure. Counting lines of code or commits to judge productivity is misleading, and 100 percent coverage does not prove quality. Metrics without context mislead. Choose a few meaningful ones, watch trends rather than single values and combine them with qualitative review.
Where it fits in the course
Software Metrics is topic 41 of 50 in Software Engineering, rated Advanced. It follows GraphQL. The next topic is Cyclomatic Complexity.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Software Engineering quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Software Engineering quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Software Metrics?
Where do people use Software Metrics?
What is the most common mistake with Software Metrics?
What should I learn before this topic?
How can I practice it?
Is Software Metrics hard to learn?
How long does it take to learn Software Metrics?
Which topics are related to Software Metrics?
What should I study after Software Metrics?
Related topics
- GraphQL (Software Engineering)
- Cyclomatic Complexity (Software Engineering)
- REST (Software Engineering)
- Performance Profiling (Software Engineering)
- Evaluation Metrics (AI & Machine Learning)
- Software Transactional Memory (Concurrency & Parallelism)
- Software-Defined Networking (Computer Networks)