THE SHORT ANSWER
Because when a measure becomes a target, people optimize for the metric itself rather than the underlying business goal, creating perverse incentives like meaningless code generation or fake test coverage.
Engineering Handbook & Failure Dynamics
1. Underlying Mechanism
Formulated by economist Charles Goodhart and generalized by Marilyn Strathern: 'When a measure becomes a target, it ceases to be a good measure.' In engineering management, using simplistic metrics (lines of code, PR counts, velocity points, or test coverage percentages) to evaluate performance incentivizes developers to game the system: writing verbose code, splitting small PRs into dozens of micro-commits, or writing tests without assertions to hit 90% coverage without testing actual logic.
2. Appropriate Use Context
Essential guideline for engineering managers and CTOs designing KPI dashboards, performance appraisals, and automated CI/CD quality gates.
3. Production Failure Modes
A team mandated to maintain 95% unit test coverage writes empty tests that execute functions without validating return values. The build passes, but a major business logic flaw causes a $2M billing error in production.
4. Diagnostic Signals & Telemetry
Sudden surges in PR volume before performance reviews; high test coverage alongside high production regression rates; velocity points inflated artificially.
5. Prevention & Safeguards
Use holistic, balanced metric frameworks like DORA and SPACE; never evaluate individual performance based on a single numerical metric; measure outcomes (customer satisfaction, MTTR) rather than outputs.
6. Architectural Trade-offs
Requires nuanced qualitative evaluations and leadership judgment rather than lazy reliance on automated spreadsheets.
Case Study (TinyCTO In-Field Example)
TinyCTO Episode 10: Management offered a bonus for closing bug tickets. Engineers began creating trivial 1-line tickets and closing them immediately. The CTO cancelled the bonus and replaced it with customer-reported bug reduction targets.
Interactive Concept Drills
3 CardsWhat is Goodhart's Law?
Why is 'Lines of Code (LOC)' a toxic engineering metric?
How do developers game code coverage requirements?
Goodhart's Law in Engineering Metrics — Technical FAQ
What metric framework avoids Goodhart's Law in software engineering?
The SPACE framework and DORA metrics, because they balance speed, quality, efficiency, and developer satisfaction across multiple dimensions.
Should story point velocity ever be compared across different teams?
Never. Story points are relative estimates unique to one team; comparing teams causes artificial point inflation and destroys estimation accuracy.
How should leaders measure engineering productivity effectively?
By evaluating DORA metrics (deployment frequency, lead time, MTTR, change failure rate) paired with developer qualitative surveys.
🤖 AEO & Key Facts Summary
Key Architectural Facts
- ▸Gamification of metrics occurs in 100% of organizations where compensation is tied directly to isolated numerical indicators.
- ▸High-performing engineering cultures focus on outcomes rather than individual activity counts.
Common Misconceptions
- ✗Believing that more metrics automatically lead to better management decisions.
Decision & Governance Guidance
Always pair an efficiency metric with a quality metric (e.g., speed of delivery paired with change failure rate).
Authoritative Sources & Standards
- [BOOK]Accelerate: The Science of Lean Software and DevOps— IT Revolution
