Work Day Optimization: Write Code as Early as You Can
Do you dedicate your first working hour to code, or do you waste it reviewing your to-do list and responding to Slack messages?
I often find that the longer it takes me to get to my most important tasks for the day, the less I accomplish by the end of the day.
One of my favorite blog posts is “Fire and Motion” — an open admission by Joel Spolsky about days where he felt unproductive as a programmer. In his blog post, Spolsky writes:
Once you get into flow it’s not too hard to keep going. Many of my days go like this: (1) get into work (2) check email, read the web, etc. (3) decide that I might as well have lunch before getting to work (4) get back from lunch (5) check email, read the web, etc. (6) finally decide that I’ve got to get started (7) check email, read the web, etc. (8) decide again that I really have to get started (9) launch the damn editor and (10) write code nonstop until I don’t realize that it’s already 7:30 pm.
He then explains what happens on days where he can’t get anything done:
Somewhere between step 8 and step 9 there seems to be a bug, because I can’t always make it across that chasm. For me, just getting started is the only hard thing.
When I first read his blog post, I thought, wow, it’s great to hear that even the guy who founded Trello and Stack Overflow procrastinates! One of the world’s most productive developers has days where he gets nothing done! And unlike us, when Spolsky wrote this post in 2002, he didn’t have to deal with the incessant Slack, Instagram, Facebook, and Twitter notifications that consume our lives today.
My favorite part is one simple insight that Spolsky shares halfway through the post: “Maybe this is the key to productivity: just getting started.”
Just getting started. Could the answer be that simple? Start coding early?
Spolsky’s remark is an important reminder that we should be more mindful of our best times for creative work — which, for many of us, is first thing in the morning.
That’s why we literally built a mechanism to track when we start coding each day straight into our product at Software.com.
We need long, uninterrupted blocks of time to get into flow, so it’s important that we protect our time from interruptions to help drive more productive mornings. It’s also important to be aware of your team’s time, especially if you’re a manager.
For instance, one of my teammates is an early riser and usually starts coding between 5:30am and 9:00am, so I try not to send him messages on Slack or schedule meetings during those times.
I believe that both individuals and teams can adopt a “Code First” mentality to improving productivity, by purposely protecting natural focus times and putting code time ahead of meetings and other activities.
Of course, coding should never be at odds with well thought out design and architecture, good team communication, or overall code quality, but coding early can be a good habit for us to follow.