I made a quick-and-dirty Ruby script that animates the GitHub contributions calendar, for the express purpose of making this satirical video:


Twitter user Hays Stanford asked “what’s stopping you from coding like this?”, with a screenshot of a mostly-full GitHub contributions calendar.

I’m still not sure whether this tweet was deliberate trolling or accidental trolling, but it sure made a lot of people feel some kind of way. A couple of big names stepped in to denounce its message. Some people were leaving excessively spiteful and nasty replies. There was no need for that.

I knew of scripts that manipulate the GitHub contributions calendar, and it occurred to me that I could take that one step further by animating it.

I made a slapdash Ruby script that converts ASCII art strings into frames—grids of colours—and uses those to generate a video—an array of frames. The video is serialised and interpolated into some vanilla JavaScript that applies the next frame’s colours to the DOM every few milliseconds. I pasted the JavaScript into the Chrome console to kick it off.

Some Takeaways

Measuring developer productivity is a sensitive topic. Plenty of people reacted to the original tweet as if it were a personal attack. The GitHub contributions calendar has some strong negative emotions associated with it.

Outrage is viral. If not for the haters, nobody would have seen the original tweet. It was spread to a massive audience by those who disliked it.

Optimal code quality is a return on investment calculation. Low quality code can be optimal, depending on the context.