John Resig : Write Code Every Day

John Resig, of the Khan Academy developers and the author of jQuery JavaScript library, ran an interesting experiment on himself – write code every day.  The rules were very simple:

I decided to set a couple rules for myself:

  1. I must write code every day. I can write docs, or blog posts, or other things but it must be in addition to the code that I write.
  2. It must be useful code. No tweaking indentation, no code re-formatting, and if at all possible no refactoring. (All these things are permitted, but not as the exclusive work of the day.)
  3. All code must be written before midnight.
  4. The code must be Open Source and up on Github.

Some of these rules were arbitrary. The code doesn’t technically need to be written before midnight of the day of but I wanted to avoid staying up too late writing sloppy code. Neither does the code have to be Open Source or up on Github. This just forced me to be more mindful of the code that I was writing (thinking about reusability and deciding to create modules earlier in the process).

And he got some very interesting results, not to mention – a whole lotta work done.

While I’m not the biggest fan of productivity boost experiments, this one does resonate with me.  I’ve done a similar one when I was learning photography.  I decided to take at least one picture every day with my camera (no mobile phones), with no automatic settings.  Some days were better, some were worse, but I manage to run it for about four month and I couldn’t believe how much better I got  – I was still a noob, but the difference between the first days and the last days was huge!  The routine, once you get into it, is a very powerful tool, apparently.

For about a year or so now I’ve been avoiding any side projects, trying to recover from a previous burnout.  But now, slowly, I am looking into ways to get me back on tracks.  This approach looks interesting enough for me to consider.

Leave a Comment