Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have long believed (and heard from others) that keeping track of commit statistics, such as how many commits each developer makes per day, is harmful to the development process. The reason seems obvious - developers will commit in smaller increments, maximising their commit-per-day number, but making it harder to bisect (perhaps all their intermediate patches won't leave the repo well formed) and harder to work with the commit history (a change will suddenly be in multiple commits, instead of just one, reverting a patch is harder etc).

Are there any studies that show commit statistics are harmful? Any elegant and well-argued article on the topic? Equally applicable would be anything about why measuring the wrong thing leads to people optimising the wrong thing, which this problem is just a special case of.

share|improve this question
4  
"Any elegant and well-argued article"?? Your question is elegant and well-argued. What more do you need? You provided ample evidence that the numbers are trivially gamed and therefore useless. What more do you want than your elegant and well-argued question? –  S.Lott Jan 29 '12 at 14:20
    
Developers need to have tried working with finding and fixing bugs in large-commit and small-commits scenarios to see the differenc.e –  user1249 Jan 29 '12 at 16:15
    
I don't think gathering the statistic is harmful in itself but using it to evaluate programmers would be. Our VCS gathers that info, along with a myriad if other stats, and its available to the whole team but we hardly ever look at it. So no, gathering the statistic isn't harmful. –  MarkJ Jan 29 '12 at 17:21
    
I'm not debating big vs small commits here (I'm personally a small commit kind of guy), merely external pressure to change the commit size to to fake a statistic (which can never be good). I'm ideally looking for somewhere I can point others at, so I don't have to make the argument myself :) –  Neil Mitchell Jan 29 '12 at 21:24
    
I believe that this Dilbert comic makes the case as well as anything I've ever seen. –  ebneter Jan 30 '12 at 20:19
show 1 more comment

2 Answers

up vote 5 down vote accepted

http://www.mit.edu/~hauser/Papers/Hauser-Katz%20Measure%2004-98.pdf

Is this the kind of thing you're looking for? There are thousands of "you only get what you measure" articles found by Google.

share|improve this answer
add comment

It is a fun statistic to measure, but no more useful than recording the number of hours a developer worked during the week.

For one, it doesn't take into account code quality. One developer might be committing continually as he keeps on fixing bugs in his code. This would show large number of commits, compared to a developer who commits one chunk of finished, polished code. You wouldn't think that the guy with the bigger commit count was the better developer.

Similarly, someone who slacks off and surf SO all day long only to commit once a day would have the same commit count as the dedicated developer who spent all day coding only to do a final commit at day-end to keep his code safe.

If you have a system where lines of code committed is counted, the guy who goes through the source files 'refactoring' every curly bracket to his preferred style will have a huge value. The guy who did the 1-line sup-important bugfix will barely show up.

So it doesn't make any meaningful statistic even if developers don't game the system. It should provide you with nothing except a pretty graph. However everyone likes stats so I'd say keep them, but don't use them for anything other than fun.

share|improve this answer
    
While your opinion is interesting, the actual question seems to be "are there any studies...?" which your answer doesn't address. –  Bryan Oakley Jan 29 '12 at 15:46
    
"number of lines". It may take several days to research a problem that will eventually result in a single line patch. –  user1249 Jan 29 '12 at 16:17
2  
just a tale, but a classic one. –  Wrikken Jan 29 '12 at 16:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.