Goodhart’s law

A few weeks ago I made a blog post about Code Coverage, making the point that when you use the metric as a goal, it loses it purpose in the first place. Reading through my twitter feed today, I saw this:

“Team has a 30% code coverage. After running mutation tests, drops to 3% coverage.When a metric becomes a target you fool it. Goodhart’s Law” by Thierry de Pauw‏ (@tdpauw).

By the way, I suggest you follow him, it’s not the first time I’ve bumped into great content.

What caught my attention was the Goodhart’s law analogy, I had no idea such thing existed; the definition on Wikipedia is:

“When a measure becomes a target, it ceases to be a good measure.” – Charles Goodhart

Charles was an economist, not a software person, but by reading this I immediately started to think about other potential examples of this in the software world. Take agile’s velocity for example, can it be categorized the same way? I’ve worked on teams where I had to achieve a certain level of it. So instead of being informative, or an input to give others visibility and predictability it was used as a goal. It was fairly common to see people commit every possible sin to make sure velocity wouldn’t drop.

I’m glad I came across the law, now I can keep this in mind and I suggest you do the same.

For further reading, visit this blog post from Lee Copeland.

Leave a Reply

Your email address will not be published. Required fields are marked *