Developers do not just ship code. If you think developers only code you are naive and unfamiliar with developers' work.
Developers solve problems and then ship implementations of those solutions.
You can ship completely technically correct implementation to a wrong problem or wrong solution of a problem and it will look perfectly fine for an untrained eye.
My O(n^3) solution that has 1000 lines of code would be 5 times more valuable than 200 lines of code of O(log(n)) solution that I was able to write because I just fucking know what I am doing. The algorithm using lines of code as proxy for productivity will say the junior jackass did 5 times more work than me in the same amount of time.
And then you get the graybeard who changes a tiny bit in the data structure and makes entire problem go away. Find heuristics for that!
Only a person that delves in and spends a moment figures out that that half million lines of code is completely unnecessary because of Y.
The problem with measuring value of a knowledge worker is that you can't enumerate all possible outcomes to be able to tell with certainty that there is a better outcome, because you don't have the knowledge -- they have it. A person with knowledge has better library of possible solutions and better chance of finding it.
The value of knowledge worker in this case is being able to find better solution (because they have the knowledge you do not). The implementation, at least in case of developers, is usually the simple part of the problem.
Imagine you are in an unfamiliar city. You order a taxi and then spend 1h driving from A to B. The taxi is comfortable and the driver is perfect gentleman. You pay your fare and hop off at B.
Only after the fact you will or will not realise that actually, B was just one block from A and the driver essentially screwed you.
In this situation a map or instructions from somebody could tell you this, but with no map or instructions you are at the mercy of the driver who may or may not be doing good job and you will be unable to tell until after some time you got some more knowledge (got familiar with the city and got the Aha! moment).
You just refactored a piece of company software, severely reducing tech debt. Or made an in-house framework that made the others' work easier. Or mentored another engineer. By that formula you should be fired immediately.
Developers solve problems and then ship implementations of those solutions.
You can ship completely technically correct implementation to a wrong problem or wrong solution of a problem and it will look perfectly fine for an untrained eye.
My O(n^3) solution that has 1000 lines of code would be 5 times more valuable than 200 lines of code of O(log(n)) solution that I was able to write because I just fucking know what I am doing. The algorithm using lines of code as proxy for productivity will say the junior jackass did 5 times more work than me in the same amount of time.
And then you get the graybeard who changes a tiny bit in the data structure and makes entire problem go away. Find heuristics for that!
Only a person that delves in and spends a moment figures out that that half million lines of code is completely unnecessary because of Y.
The problem with measuring value of a knowledge worker is that you can't enumerate all possible outcomes to be able to tell with certainty that there is a better outcome, because you don't have the knowledge -- they have it. A person with knowledge has better library of possible solutions and better chance of finding it.
The value of knowledge worker in this case is being able to find better solution (because they have the knowledge you do not). The implementation, at least in case of developers, is usually the simple part of the problem.
Imagine you are in an unfamiliar city. You order a taxi and then spend 1h driving from A to B. The taxi is comfortable and the driver is perfect gentleman. You pay your fare and hop off at B.
Only after the fact you will or will not realise that actually, B was just one block from A and the driver essentially screwed you.
In this situation a map or instructions from somebody could tell you this, but with no map or instructions you are at the mercy of the driver who may or may not be doing good job and you will be unable to tell until after some time you got some more knowledge (got familiar with the city and got the Aha! moment).