During the period of British rule in India, the government in Delhi grew concerned about the number of venomous cobra snakes in the city. To solve the problem, they offered a financial bounty for every dead cobra brought to them.
At first, it worked. Large numbers of snakes were killed for the reward. Then, enterprising locals realized that the easiest way to make money was to actively breed cobras in their homes just to kill them and collect the bounty. When the government realized what was happening, they canceled the reward program. The breeders, now stuck with worthless snakes, released them into the city. The cobra population was ultimately worse than before.
This historical failure gave birth to the term The Cobra Effect, which is the direct result of a systemic principle known as Goodhart’s Law.
Simple Definition of Goodhart’s Law
Coined by British economist Charles Goodhart, the law states: "When a measure becomes a target, it ceases to be a good measure."
In a professional environment, if you reward people strictly based on a single metric, they will optimize their behavior to hit that metric at all costs, even if it completely destroys the overarching goal the metric was originally intended to track. This creates perverse incentives.
How Bad KPIs Weaponize Engineering Teams
Engineers are, by definition, professional problem solvers. If management hands an engineering team a poorly designed Key Performance Indicator (KPI), the team will "solve" that KPI with ruthless, destructive efficiency.
Consider an engineering manager who wants to accelerate product development. They decide to measure and bonus the mechanical design team based on "Drawing Release Velocity" (the number of CAD drawings released to manufacturing per week). Management believes this will force efficiency. Instead, they trigger the Cobra Effect. To hit their quotas, engineers begin releasing incomplete drawings with "TBD" dimensions or unverified tolerances. The metric looks fantastic—drawing releases are up 40%.
However, downstream on the factory floor, assembly grinds to a halt. Machinists are guessing at dimensions, rework skyrockets, and the scrap rate doubles. When the defective parts are accepted just to keep the line moving, the team slips directly into the Normalization of Deviance.
The same failure mode appears on the factory floor. If a production team is measured only on “units per hour,” operators will increase speed at the expense of tool life and dimensional stability. Output rises—until scrap and machine downtime erase all gains. Management hit the metric—and destroyed the profit margin.
“Show me the KPI, and I’ll show you the behavior.”
The Contrast Insight: Metrics vs. Health Indicators
It is critical to contrast a target metric with a health indicator. You absolutely need data to run an engineering department, but the way you frame the data determines the behavior.
A target metric drives behavior. A health indicator reveals reality.
A target metric is a number tied to a reward or punishment (e.g., "Release 10 drawings this week or face a performance review"). A health indicator is a number used strictly for diagnostic visibility (e.g., "Our drawing release cycle currently takes 14 days; let's investigate where the bottlenecks are"). When you detach the measurement from the immediate reward, you remove the incentive to game the system.
Engineering Controls to Fix KPI-Driven Perverse Incentives
You cannot fix Goodhart's Law by telling engineers to "do the right thing." You have to fix the organizational design. If your team is exhibiting the Sunk Cost Fallacy by clinging to bad projects, or inflating timelines due to Parkinson's Law, look at how their performance is being measured.
- Use Paired Metrics (Counter-Metrics): Never implement a speed metric without a corresponding quality metric. If you measure "Drawing Release Velocity," you must pair it with "First-Pass Yield" in manufacturing. If velocity goes up but yield drops, the bonus is voided.
- Measure Outcomes, Not Output: Stop tracking the number of lines of code written, the number of features shipped, or the number of hours worked. Measure the actual business outcome: cycle time reduction, scrap rate decrease, or direct cost savings.
- Audit for Gaming Behavior: Actively look for how teams might manipulate or bypass a KPI. If a metric can be gamed, it will be gamed.
- Regularly Retire KPIs: Metrics have a shelf life. Once a team figures out how to game a specific KPI, it loses its diagnostic value. Rotate your management targets annually to ensure the team is optimizing the product, not the dashboard.
Quick Self-Check: Are Your KPIs Causing the Cobra Effect?
- Are teams hitting all their numerical targets, but the final product is still failing?
- Is there a known "trick" or workaround employees use at the end of the month to hit quota?
- Are quality checks routinely bypassed to satisfy schedule metrics?
- Do departments blame each other because their isolated KPIs are in conflict?
Frequently Asked Questions (FAQ)
Why do KPIs fail in engineering organizations?
KPIs fail when they oversimplify complex systems. By focusing on a single variable like speed or output, they ignore trade-offs such as quality, reliability, and long-term cost.
How do you set KPIs without triggering Goodhart's Law?
By using paired counter-metrics. Ensure that any metric tracking speed or volume is mathematically balanced by a metric tracking quality or defect rates. This forces the team to optimize the whole system, rather than a single variable.
What is a real-life example of Goodhart's Law in engineering?
A classic software engineering example is measuring developer productivity by "lines of code written." This immediately incentivizes developers to write bloated, overly complex code instead of applying Occam's Razor to write clean, efficient, and subtractive scripts.
How are the Cobra Effect and Goodhart's Law related?
Goodhart's Law is the underlying principle (measures become targets and lose value), while the Cobra Effect is the worst-case consequence of that law, where the attempt to fix a problem actively makes the problem worse.
The Framework for Rational Measurement
Bad KPIs do not just measure failure—they actively manufacture it. Managing an engineering organization requires understanding that every metric you introduce will permanently alter the behavioral psychology of your team.
High-performing engineering organizations do not chase metrics—they design them carefully. If your metrics are wrong, your system is guaranteed to fail—efficiently.
To understand how poorly designed metrics lead to organizational rot, and how to build systems that measure what actually matters, explore the definitive breakdown in Jerry Z. Muller’s eye-opening book, The Tyranny of Metrics.

Comments
Post a Comment