Site Tools


swe:goodharts-law

Table of Contents

Goodhart's law

Goodhart's law states that when a measure becomes a target, it ceases to be a good measure. Once a metric is used to evaluate performance, people optimise for the metric rather than for the underlying goal it was supposed to track, and the metric diverges from the thing it was measuring.

Code coverage targets produce tests that execute code without asserting anything. Velocity metrics cause estimates to inflate. Commit frequency metrics split changes into tiny commits. Bug count metrics cause bugs to close without being fixed. The metric rises but the underlying goal deteriorates.

Use metrics for learning rather than evaluation. Rotate metrics so they cannot be persistently gamed. An observed metric remains informative; a target metric should be interpreted with caution. Related: Parkinson's law describes similar dynamics with time estimates.

swe/goodharts-law.md · Last modified: by 127.0.0.1