Skip to main content

Goodhart’s Law: How Bad KPIs Destroy Engineering Quality

Goodhart’s Law: When a measure becomes a target, it ceases to be a good measure.

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.

Advertisement

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.”

Advertisement

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
Advertisement

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

Popular posts from this blog

Murphy’s Law: Why Defensive Engineering Expects Failure

Murphy's Law: Anything that can go wrong will go wrong. In 1949, aerospace engineer Captain Edward A. Murphy was working on Project MX981 at Edwards Air Force Base, testing human tolerance to extreme G-forces using rocket sleds. During a critical test, all 16 strain gauge sensors wired to the test subject returned a reading of zero. Upon inspection, Murphy discovered the problem: every single sensor had been wired backward. The sensors allowed for two possible methods of connection, and the technician had chosen the wrong one 16 times in a row. Frustrated, Murphy coined a principle that would forever alter the discipline of engineering: "If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it." Pop culture eventually shortened this to Murphy’s Law , treating it as a pessimistic joke about bad luck. But for engineering leaders, it is not a joke. It is a non-negotiable boundary condition ...

Drum-Buffer-Rope: Finding Your True Bottleneck

The Theory of Constraints: A factory can only produce as fast as its slowest machine. In many High-Mix, Low-Volume (HMLV) manufacturing environments, the scheduling system consists of the sales team receiving a Purchase Order, running out to the production floor, and shouting at the supervisors to prioritize it immediately. This creates a catastrophic "Push" system. Management dumps raw materials onto the floor as fast as possible, believing that if everyone works at maximum speed, the product will ship faster. Instead, they trigger the exact Job Shop Chaos mathematically guaranteed by Little's Law . The floor clogs with Work-In-Progress (WIP), cycle times explode, and nobody knows what to work on next. To fix this, you must stop managing the entire factory and start managing the only thing that actually matters: The Bottleneck . Advertisement The Theory of Constraints (TOC) Introduced by Dr. Eliyahu M. Goldratt, the Theory o...

The Pike Effect: Overcoming Learned Helplessness

Imagine a large pike placed in an aquarium, separated from the smaller fish it usually hunts by a clear glass partition. Naturally, the pike strikes. It hits the glass. It tries again, and again, experiencing a painful collision every time. Eventually, the pike gives up. But here is where it gets interesting: when researchers remove the glass partition, the pike continues to stay on its side of the tank. It starves to death while surrounded by food, convinced the barrier is still there. This phenomenon illustrates a powerful cognitive bias known as The Pike Effect , a visual representation of learned helplessness . Advertisement The Mechanics of Learned Helplessness In human terms, the Pike Effect happens when past failures condition us to believe that success is impossible, even after the environment has changed and the original obstacles have been removed. We build invisible glass partitions in our minds. A failed project, a rejected p...