The Evils of Gamifying Git

Your green squares do you little good, and encourage bad behaviour.

Nearly two years ago, GitHub introduced contribution calendars on everyone's profile, which roughly visualize how frequently one has been "contributing" for the past year. Through 2013, mine displayed some interesting patterns and features, many of which scream that they have a story:

Having used GitHub as the primary code host for multiple full-time jobs, and a few growing open-source projects, I now believe that these calendars introduce, for me, two negative effects that vastly outweigh their benefits.

1. "Why weren't you working?"

If you find yourself using GitHub as your code host for your 9-5, you will likely end up with a fairly solid green stripe down the center of your week. In this mode, the vast majority of features appear as a subtraction of effort. The GitHub staff demonstrated this effect in the introduction, in which their example is annotated mostly with reasons that they weren't committing:

(Notice the very consistent solid stripe at the beginning? There are no annotations there, so that is clearly what is expected as "normal".)

In my 2013 graph above, you can easily identify 2 weeks of Christmas holidays and a few months of un-software-employment, but here are many other holes in which nothing noteworthy actually happened in which it is very easy to jump to conclusions from the wrong point of view.

There are so many valid reasons that one would not have committed code (or otherwise "contributed") on any given day, that it is ludicrous to feel the need to defend them. However, I still feel like I'm being reduced to the number of commits I make and the time at which I make them (which is nearly as bad as judging someone by the lines of code that they write).

2. Gamificiation drives poor practices.

I have, on more than one occasion, pushed myself to work on one of my open-source projects in order to "earn" my green square for the day, and have celebrated creating ever longer streaks:

After a concerted effort, I broke my longest streak on @GitHub. Finally, I can slack off again.

@mikeboers on . Visit on Twitter.

This can be an awesome motivator for productivity.

However, if one is protective of their green squares it may influence their judgement with respect to squashing and/or rewriting history (in an effort to clean it up). I have found myself prey to this on more than one occasion, and I believe that in my quest to keep an active appearing calendar I have not done my best for the projects themselves.

Sometimes, the best repository history to understand the progression of development is not the one that you created while you were developing (especially if once or twice was only for the little green square), and you should squash and/or rewrite history with prejudice.

I have come to this conclusion for my personal work, but also as a maintainer of a few projects which are slowly gaining a steady stream of contributors; I have sacrificed a clean history in order to maintain the green squares of others (who due to less contributions in general may find them more precious).

<updated 2014-11-12> Similarly, the relationship that is expressed via a fork can be important, however your contributions are untracked if they are not merged back into the parent. I have a number of projects which originate with one employer, and continue use at another. I had to choose between maintaining the relationship via a fork, or my contributions being acknowledged via a clone. I opted for a clone. </update>

How I deal with it.

In order to free myself from my self-imposed shackles to a pretty contribution calendar, I have scratched out the whole thing; I have created a dummy repository of ~20k commits whose only purpose is to obscure my actual contributions:

This is sure to raise some questions/eyebrows as it may seem like I am trying to hide from my activity, but in fact I am trying to free myself to be a more responsible developer, and assert that I am pursuing nobler goals.

Posted . Categories: .