What does Godhart’s law mean?

354 viewsOther

It goes “When a measure becomes a target, it ceases to be a good measure.” How does that work in practice?

In: Other

30 Answers

Anonymous 0 Comments

A classic example: lines of code written.

As a software engineer, I spend a bunch of time writing code. On a bad day, if I’m unfocused, I’ll write very little code. On a good day, I’ll write a bunch of code. If you ignore my other responsibilities, you can look at how much code I write on any given day and measure how productive I’m being. Lines of code written are a fairly decent measure of my personal productivity.

Ok, if lines of code written are a measure of productivity, and you want to reward productivity, you should reward people for writing more code, right?Your measure becomes a target. Well, that’s where it all goes awry.

First off, different people have different styles. I try to write code as simple as possible, and tend towards a fairly terse style, so I’ll almost always write less code than my colleagues to complete the same task. So now my performance seems “bad” for no particular reason. Second, more perversely, if your objective is to write as much code as possible, it’s _really_ easy to write the same functionality using more code, at the cost of it being really low quality code. You know the sort of person who just rambles on and speaks a lot without really saying anything? Code written like that.

So, by rewarding people for writing more code, the net result is that you get lower quality code that’ll be harder to maintain in the long term. In becoming a target, lines of code stopped being a good measurement of productivity.

You are viewing 1 out of 30 answers, click here to view all answers.