What I’ve Learned From Git Commiting Every Day for Three Months

or Code and the Shackles of Behavioral Psychology

I want to say this up front, I did not intend to do this. I never had a plan to get a streak of commits going. Frankly, I noticed that I had done it naturally for a few weeks and decided to keep it up. Now it’s kind of at the point where I waver on a daily basis between keeping it going and letting it die. I thought I would share some of the things I’ve learned in that time period. Hopefully, with a little humor.

Those Green Boxes Are Addictive

That simple, innocuous data visualization of little green and gray boxes poses as a non-threatening, inconsequential little bit of UI, but if you’re not careful, it’ll bite you. Sink its teeth in and not let go.

Sure, I’m waxing poetic a bit, but that little data viz is powerful and addictive. Once I started to see solid columns of green, I didn’t want to quit. It almost feels embarrassing to allow a single block of gray be on it at this point. This quality is both good and bad depending on how you respond to addictions.

Consistency Is Good

One good thing about making daily commits and turning those gray boxes into green ones is how it gets you to work on your projects every day. Working on a project every day is the best way to stay productive. There’s very little time lost trying to remember where you were and get back up to speed. How many times have you started a side project, gotten about half way through, and never were able to finish because by the time you came back to it, nothing about it made any sense? It happens to me all the time. Working every day on something alleviates that problem entirely. However, maybe you finish a project, but don’t want the streak to end, so...

Trivial Commits

While you have a good project to work on, yes, keeping a streak going is both useful and a delight. But often times, I found myself rushing to make a trivial commit just before midnight to keep the streak going. The streak became the goal rather than daily, consistent output of code. That should be the goal. Writing great code, building something awesome piece by piece. Sad to say this, but the need to keep the streak going is why so many of my boxes are a light shade of green. Only a commit or two was made that day.

These commits also weren’t serious commits. A lot of them were in a private repo I use to keep my blog posts in or some other private side projects. I’d tweak something here; edit something there. They weren’t substantive. I think substantive coding is much more satisfying, but behavioral psychology clearly demonstrates otherwise here.

I also noticed that I avoided doing OSS because there was no guarantee a PR of mine would get merged into master on a given day. This had me gaming the system in my favor and not the community’s favor. In order to keep the streak going, it was better for me to be selfish. I think these last two paragraphs are really great reasons to let the streak die.

This is Tough To Do When Your Day Job Doesn’t Use Github

The hardest part of this was easily the fact that I would code all day at work and have nothing to show for it publicly. So, I’d come home without a lot of energy to keep coding and just do something small. I don’t think I would care about a streak at all if my day job used Github and my activity was showing up in the data viz. Call me vain, but I like showing others that I’m writing a lot code.

What I’ll Do Moving Forward

I think I just need to let it die honestly. I think I’ll do it with something substantial, perhaps some work on an OSS project. Something where I feel accomplished when I submit the PR.

Have any of you had big streaks? Any lessons learned from it? I would love to read them in the comments below.

Categories: