Why are those objectively useful metrics for productivity though? I can think of a dozen reasons why they aren't, as opposed to why they might be. Which, I guess, makes their objective usefulness subjective.
Some people will be working on longer lived feature branches because they're more complex, so they end up with one merge to master in the time it took the dev updating REST APIs to accommodate a new optional parameter to merge four branches.
Someone writes four tests that another dev might cover in one because the four assertions were all closely related to the same invariants and code paths. Who was actually more productive?
One developer pushes to production three times in one day because they typoed a property name twice... ...etc. etc. ad nauseum.
If you seriously believe that these metrics are objective methods of measuring developer productivity, I strongly suggest you spin off a business, because you're about to make millions.
Do they have to sit around and ensure that their coworker includes a "Co-Authored-By" in the commit message? One commit message? All commit messsages? etc. etc.
[1] https://www.lesswrong.com/posts/YtvZxRpZjcFNwJecS/the-import...
And I am still the same person - only my position changed.
I'm working on such a thing, and I will check in ~100k lines of code when it is the right time to do so. That is not now.
A side effect of atomic commits is that number of commits does better correlate to "work done", I suppose.
Also, I disagree that number of commits is a useful measure of work done. Not any more useful than butt in seat time. Nobody can say whether that feature is 200 or 2000 commits, it really depends on how you split it up. It could be 2 commits, plus the fixes that follow once it actually runs and gets tested and fleshed out.
If tracking progress is a priority, you break the job down to some reasonably small number (no more than a couple dozen) of items in a TODO list and update it with what's done and rough estimates of what's left to do. That's a hundred times more useful than "N commits, 123 hours of butt in seat."
Or maybe you can just demonstrate what works. Or tell, when it comes up in a meeting.
(I'd argue that butt in seat time is actually more useful than number of commits, because the latter can change by an order of magnitude depending on how you split it up but I've never estimated to take a month to deliver something that ends up taking 10 months.)
Of course, over-engineered solutions will score you more commits (or more lines of code, or more TODO items, etc) but still be a bad outcome.
Even very small and simple features can end up being anywhere from 1 to 15 commits.
This all came up in the context of measuring productivity, though, not measuring progress on a specific project. Looking backward, it is a list of items completed. If the teams strives to keep them atomic in general, they are more likely (though by no means guaranteed) to be closer in size. So my guess is that this would correlate better to productivity than lines-of-code or time-in-seat, while still falling well short of the ideal.
Genius is when you write a piece of code that's so simple everyone else thinks they could have done it. And yet they didn't.
And then there were the other devs peer reviewing his code, happily accepting his PRs without needing to add comments or request changes.
And then there was the QA team doing the integration and end-to-end tests, user testing, training, etc.
He couldn't have been quite so productive without those all those people.
That's not to put his amazing work down. No doubt he was brilliant. It's just that we shouldn't ignore the efforts of the people who enable developers like him to get on with what they're good at. Development is a team sport.
Used to be like that when I was young
I also know that there's the guy that never writes tests, is incapable of writing non reduntant-code, pushes everything to master as a blob of unrelated changes, using git as the backup server, comments are sparse and mostly useless, code is a mess and 'deploy to production' means starting a Jupiter notebook on the Dev machine.
The same guy saves to the company millions in expenses and gets the promotion.
10-20-100x Devs are just very good Devs, nothing that automatically changes the fate of a company
You can have the best guitar player in the World and your band goes nowhere or you could be the Ramones...
Did that not lead to a super competitive workplace? I cannot imagine that this was very motivating to the remaining 990 devs... Or was it?
The world would be a much less vibrant place if not for the obsessives among us who devote themselves religiously to their craft. Whether that be programming, writing, art, or otherwise.
Inappropriate behavior may have been well tolerated in the patriarchal past, but in 2020 we are expected to do better and our institutions can ill tolerate the risks presented by asocial white men.
At one of my employers we had a very large and highly skilled dev community and being quant-biased, we tracked code checkins over time, number of tests written, number of pushes to production etc. I was very proud to be about number 3 or 4 out of about 1000 devs on these productivity metrics consistently over a period of 8 years there.
There was one guy however who literally dominated. Not only was he number 1 on any metric, but he did more checkins than the number 2, 3 and 4 devs combined. He had so many checkins that eventually our glimpse code search index whitelisted his userid because it thought it was a keyword in the language.
And it wasn't that he was a cowboy, he was obsessive about code quality, fixing bugs etc and also was top if you looked at test coverage etc. He was just a flat out machine - every day he would just come in and code all day whereas I have spurts of productivity with downtime etc. He didn't seem to need to be intellectually fascinated by a project and was just as productive at the beginning as at the end of a project - one of my colleagues joked that this guy's interest level in any project was always 83% ("Almost but not quite very interested") no matter what it was. He was very skilled and just churned out massive amounts of code all day every day. He never fell into the classic engineer's trap of overcomplicating things - in fact a lot of what he wrote was very simple when you looked at it (and I think that's part of what made him so good - he had a brilliance for finding really obvious, simple ways of solving hard problems) and because he wrote tests for everything he didn't really need to go back and or refactor things much.