Thirty-Nine Days of Code

Github Contribution Calendar

Early last May I was inspired by John Resig’s post Write Code Every Day and decided to give it a go myself. I made a commitment to myself to program outside of work for a minimum of thirty minutes each day and have it committed by midnight. I surpassed this initial goal and made it to thirty nine days in spite of a brief bout in San Francisco. Now I’m not going to pretend that this endeavour had some profound effect on me, but it did oblige me to write this post. :) Here’s what I took away from it.

Programming on a plane is hard

It didn’t occur to me when I started that I had several trips planned for June. This meant that in order not to break my coding streak that I had to write some code at 30,000 feet. Maybe this wouldn’t have been so bad if I was sitting in first class (or if the plane had WiFi), but on a budget Southwest flight it wasn’t exactly pleasant. My Chromebook (thanks to the magic of Crouton) came through for me though and was a joy to use since it fit perfectly on the seat-back table.

Program with purpose

For the first half of the month, coding every day was a breeze. This was because I not only had a plan, but I also had a purpose. I had been meaning to make a static Jekyll powered blog for quite some time for writing, and pictures, and such, but life always got in the way. Now that I “had” to code, it was effortless. However, once I got the site to a state where it was presentable and updating it wasn’t as critical, my progress slowed. I knew that I would need to start another project if I wanted to finish the month, but nothing truly compelling came to mind.

One day in mid-May I received an email about a book that I had preordered over a year ago, the second edition of The Joy of Clojure, saying that it was going to be released at the end of the month. Around this time I also received some “fan mail” requesting additions to my really good poetry blog, Really Good Poetry. Now I’m all for writing crappy poetry, but I really don’t have the time these days so I thought maybe I could automate the poem writing process with Clojure, Open-NLP, and Markov Chains. And that’s how my first Clojure project poet was born.

The problem with poet, however, was that it was sort of a cop-out. Now polluting the web with crappy poems is a noble goal and all, but in the scheme of things the code that I was producing each day was meaningless and what started out as an exciting experiment quickly devolved into yet another nightly chore. Moral of the story is if you’re going to code every day, make sure you have a reason to.

Forget the yearly contributions calendar

It’s fun to use the code contributions calendar on your Github profile to track your progress, but don’t pay it too much credence. At times I was so preoccupied with “not breaking the chain” that I would push trivial additions (poet was great for this) just to get another green square.

I should have kept the streak going for one more day

Then I could have made the title of this post something catchy – something like “40 Days and 40 Nights (of code).”

Oh well. :)