100 Days of Code

One piece of advice often given to beginner coders interested in sharpening their skills is to code every day. Other professions have this: for instance, Jerry Seinfeld encourages writers to write every day. Sometimes coding every day can just be for your job; I’ve also heard people say that you should do one pull request a day on GitHub, close one issue a day, or work for 30 minutes on some open source project. I had a coding streak that lasted 110 days straight; here are my thoughts about the experience.

Why do this?

Even when not explicit, there is implicit pressure on the web to encourage daily coding. My twitter feed is littered with new frameworks I should try out, or cool hacks that I should be using. Newsletters tell me to ship faster. And when you look at more experienced coder’s GitHub profiles, sometimes the only color is green.

I’ve been coding professionally on a mostly daily basis for something like four years now. Recently, I moved to San Francisco, and decided this was as good a time as any to up my game. So, I decided I would code every day for at least 100 days, and see whether coding every day is different than coding every now and then throughout the week. The only rules I had for myself is that the code had to be meaningful, and that the code had to be open source — closed source commits didn’t count as code, no matter how much I did.

Partly, this was to satisfy my desire to gamify my GitHub profile. I’ll admit that openly. I’m aware that gamification is pretentious and inherently worthless. At the same time, having a large social media or coding presence can help my projects go further by improving my clout, and can help me establish a proxy of credibility so that I can raise my rates as an independent contractor or get hired faster. Further, by coding every day, I would be able to sharpen my skills along the way — the pretension of being a daily coder wouldn’t be pretension, it would simply be a record of things done.

My 100 Day Streak

So, I started coding. And I didn’t stop for 100 days. Every day, I did some meaningful code. There may have been a few days where I messed up and only opened issues, but the majority of the time I did something interesting — whether making a side project, working on my full time job (which is kind of cheating as it is all open source), or helping out some other projects. I like doing documentation fixes — a lot of my patches are fixing spelling mistakes. But the majority of the commits were code - and I didn’t stop. Not even on the weekends.

New Years was around 80 days in — I went out of my way on New Years Day in a cabin in Tahoe to log in and edit some things, ignoring my friends for twenty minutes. There were a few other days like that — I remember committing code from the Taipei airport, on the way to Indonesia. A much more experienced, prolific coder I know told me that he doesn’t care about streaks, but he had taken note when flying over the Pacific to see if his streak broke — I did the same, and felt like I was part of a special group.

Another friend of mine has been streaking for over 500 days and can't seem to stop. The problem is, once you start, it is addictive. It becomes a thing you do — you wake up and think, “What can I commit today?” And sometimes, this isn't healthy. I’d rush home from bars every now and then to commit some code before going to bed. This did not lead to good code, at all.

Eventually, my streak broke accidentally: I forgot to log in. I’m happy about that.

Lessons Learned

Did I learn anything? You bet.

I learned code every day isn’t a meaningful concept if you’re not interested in putting in at least 30 minutes a day. If you’re not in flow, if you’re not doing something new, if you’re not learning or creating, you’re not doing anything at all. A lot of the time I spent committing would have been better spent eating ice cream in the park.

Keeping up the streak on GitHub isn’t hard — all you have to do is set up a cronjob with automatic edits. What’s hard is saying, daily, “I am going to create something.” What’s hard is remembering that this isn’t actually healthy. It’s ok to take breaks and get some time away from screen. Taking time to go for walks, hang out with friends, is often a far more important part of coding than coding, because when your mind is relaxed you’re more likely to think in novel ways.

One of the best things I learned from all of this happened after. I tweeted ‘100 days of coding!’ and a friend of mine, another coder who I would consider a foundation of the community, tweeted at me: “Someone’s got a problem ☺”. I looked at his code, and sure enough, white squares happen every few days.

It’s not about coding every day. You can still be an amazing coder without stressing yourself out. Code when you want.

I have a few more white squares now.