So now line 2 is exit 0.
It's very performant.
That will be well over $20k from the corporate salary budget, thank you!
And yeah, I can totally see somebody doing it on practice. I have seen people do lots of similar things.
As a child, I worked at a large popular fast food chain. Also measured by error metrics, the trainer showed me how to fry a frozen chicken sandwich. The meat spilled to the floor on accident. He said, "here's your first lesson: no one saw that!" Into the frier they went, metrics perfect.
It's all the same bad faith. Managers put odometers on every interface, workers spend their time developing odometer foulers. I could never own a business I wasn't the sole worker at.
Most of the complexity, inefficiency and the related failures in today corporate and institutional world is driven by too much management. The map has become the territory.
Therefore, if you are unhappy with a measure, it means solely that it doesn't capture all of your preferences properly. Which is a technical problem rather than a philosophical one.
And then over time they start realizing they don’t have to lift up the whole product, but just a small piece to increase the measurement. So they do that and the measurement goes up, but the product doesn’t get better because they’ve found the path of least resistance to raising the measure. This is really the underlying crux of Goodharts Law. So it was a good measure probably until it became a target.
So what is a manager to do? “Capture all [the] preferences properly” as you put it? Probably not because that quickly devolves from measurements to long form status reports, not even measurements, because it’s impossible to capture all dimensions of this with measurements, so one has to reduce the dimensionality a little.
This is a philosophical problem not a technical one. Though your point does seem superficially correct, in practice with real teams the second and third order effects from the measure becoming a target dominate.
That assumes that the ones working towards a specific KPI are both the ones noticing the metric is bad and that their are noticing it before the negative consequences have destroyed their product / company.
Often when the issue of optimizing to KPI comes up, it seems that exterior people notice the problem but not interior ones, or otherwise the issue is noticed after the fact but not before a meaningful change could be affected.
Here, you're assuming that the space of possibilities is an ordered set. But it's probably not, so your “technical problem” is in fact a mathematical impossibility.
With KPIs, you push people to maximize a very-straightforward-but-fundamentally-flawed metric, instead of relying on their own judgment. Or when not trusting your employees end up having them behave like brainless bots.
So even a good measurement is vulnerable to this problem.