
Goodhart's Law and Metric Gaming

Software Engineering Laws Every Developer Must Know in the AI Era - Milan Milanovic
Topic 5 of 11
Published Aug 10, 2026 · Clip 23:28–31:04 (7:36)
Milan explains Goodhart's Law: when a measure becomes a target, it stops being a good measure. Historical examples include lines of code as a proxy, and today's 'tokenmaxxing' shows people optimizing token counts rather than outcomes. He recommends pairing every metric with a counter-metric (e.g., speed vs. stability) and checking whether the metric can be gamed. The host and Milan discuss focusing on impact and outcomes over outputs, using OKRs to define outcomes, and note that leaders shape KPI structures and must avoid easily gamified metrics like code coverage.