Everyone knows the routine, get to work by 9 AM, sit in front of the computer, code all day, and head home at 5. Now, thanks to guys like Tim Ferris I have started to re-think how I work and what makes me productive as a software developer.
Recently, I made some big changes to my Monday to Friday schedule. For a long time, I did things just like all of the other coders I know. But during the second half of 2011, I started experimenting to see what type of daily schedule makes me most productive. This is still a work in progress, and I do not work on military precision – I may get up 20 minutes earlier or later, for example – but here is my current schedule:
4.30 AM to 7 AM: Meditation, Writing, Goal Review Family Breakfast
Getting up at 4.30 AM is actually not that hard. Everyone is a bit different, but the body generally needs 7 to 9 hours of sleep. The way to know if you are getting enough sleep is to wake up without an alarm. Just go to bed early enough and you can wake up at 4.30 AM also.
Immediately after getting up, I drink 16 oz of water—no coffee! I have not had a coffee in a long time, and I don’t miss it much. In fact, I feel better without it. Then I take a shower; I want to start the day fresh.
I meditate for 30 minutes every morning. It’s best to meditate just before or during sunrise, so any time before 6 AM for people in the western world. I am not going to explain why meditation is good for you; there is plenty of research on the net. If you want a good book on meditation I recommend Meditation for Dummies. Despite its name, it’s one of the best books I have read.
After that, I spend 30-45 minutes writing content for my blog. I will try to write between 500 and 800 words. I have found that I can pull it off if I do this task very well right after meditation. Plus, the brain works all night while we sleep, so its best is to do a brain dump before moving on to other mental tasks. A tip on writing: use this time for an initial brain dump. Don’t try to do research, editing, etc. until later.
Then it’s To Do List time. I check my emails, Twitter, LinkedIn, etc., and assign tasks. Speaking of tasks, I follow the GTD Method and orient my life around Omnifocus software. I run this on my iPad, iPhone, and MacBook Air (ok, so I am an Apple fan boy). Yes, Omnifocus is a bit expensive for a to-do list management software, but since my entire life revolves around it, it’s worth the price. I go through my list and compare it against my goals – everything from small objectives for today to long-term goals. Every item on the list should relate to a goal. If it doesn’t, I remove it.
Breakfast is next. There are several schools of thought on when you should have breakfast and what you should eat. I have experimented with lots of different things. I find that something fiber rich, low carb, and high protein works best for me. Ever tried oatmeal with peanut butter? Perfect! I also like to include fresh fruit and tea. Also, we try to have breakfast as a family. Sometimes we make it work, and sometimes not. My goal is to get this 100% this year.
7 AM to 11 AM: My 4 hour Programmer Time
This is the time that I use for coding. 4 hours a day may seem ridiculously small, but I have found that I can get more coding done in these 4 hours than most people can do in a week. Research has shown that people who have a consistent timetable deliver better than people with a random work schedule. For me, it’s 7 to 11 AM, every day. All I do is coding during this time, nothing else. There are a few ground rules:
First, turn off all communications – phone, email, chat etc. You should have no distractions. You can give a handful of people a way to reach you if something is really urgent. The people who might have a reason to contact me in an emergency know how to do it, and I have yet to have anyone use it. I have even trained my wife, who used to expect immediate answers to every question, to respect this 4 hour block. also you should work on a single project. Don’t try to work on 5 different things.
Second, Don’t take any breaks for e-mail, surfing on the net, or anything like it. Here’s why: In an hour’s time, I can get x number of functions coded. I have found that if I work for four continuous hours, I can deliver not just 4 times but 8 to 16 times that amount of work. You will experience this when you 100% focused on one objective and not thinking about anything else. This is what we call the Flow mental state. I plan to write more about the state of Flow in a future blog entry.
So why not apply the same principle to an 8 hour work day? Because there are limits on human productivity. The brain is just like a muscle. Can you continuously run on a treadmill for eight hours? Like our muscles, the brain needs occasional rest. The limit is a bit different for each individual. Through trial and error I have found that 4 hours is my max.
It is also worth mentioning that I don’t set an alarm for an 11 am stop. I finish work when I feel my brain is getting tired and my productivity is decreasing. Some days I work for 3 hours and some I work for 5 hours; 4 is the average.
I work from home to avoid disturbances. If you are based in an office environment, see if management will allow you to work from home during your most productive time. The daily commute to the office can undo the benefits of yoga and meditation. After you drive through traffic and hit all of that office noise, your brain may be so stressed that the benefits of meditation disappear. You will probably be more productive working from home.
11 AM to 1 PM: Gym, Lunch, and Shopping
I hit the gym every day. John J. Ratey’s book Spark: The Revolutionary New Science of Exercise and the Brain make a good argument for daily exercise so if you want the science behind why brain functions improve when you exercise read this book. Don’t try to do the same work out or even go to the same gym every day. I do yoga 3 days a week at a yoga studio, and spinning classes 2 days at a spinning studio and I do weights 2 days at my gym, where I have a trainer. Having some someone to push me is the best motivation so this is where a trainer helps you a lot.
I love the gym because of the extra services. You can take 5 towels with no wife around to complain. You can take a 30 minute shower with no one waiting outside the door and shouting “Are you done yet?”… Which happens a lot at my home.
I also make a point of shopping for groceries every day, usually at the Whole Foods which is walking distance from my house. Why shop every day? In many countries, especially throughout Asia, people shop for groceries every day instead of buying two weeks’ worth of stuff to store in the freezer and the fridge. This way, you buy only what you need and cut back on waste. How many times have you found some something unidentifiable in the back of your fridge or freezer and wondered if it was more than six months old? I grab lunch while I’m out. Whole Foods has a nice salad bar. Since I love Japanese food, I will sometimes hit my favorite joint for some sushi or a bento box.
1 PM to 6 PM: Learning and Talking Time
I try to stack my appointments so I do not have to drive to work every day. Usually, this time involves meetings, interviewing candidates, presentations, mentoring developers, code reviews etc. I do not do any coding during this time unless there are an urgent bug fixes or fires to put out.
I also dedicate significant time to learning. I spend a lot of time reading other people’s stuff, everything from books to blogs to code base related to technology and neurosciences I try to learn something new every day. The best way to stay motivated and on track is to write few lines of notes on each subject and then bookmark any references. Software like EverNote it is good for that.
Also look at what other products are on the market, the most productive software developer is someone who writes zero lines of code to solve a problem. I do not want to reinvent the wheel if someone else has done the work. This is where spending time on CodePlex, GitHub and Component Source helps.
I have taken a lesson from my wife’s experience during her medical internship. Every morning the new doctors spend time with patients. Then, in the afternoon, they all gather to discuss the complications they encountered and how they solved problems. In my case I try to conduct a post-mortem on my activities. I examine where I got stuck when I was coding in the morning, where I was chasing a bug or how I did a presentation, handled a meeting and so on. I try to learn from my mistakes and avoid repeating them.
6 PM to 8.00 PM: Family Time
My wife is a doctor and has a busy schedule but we do our best to spend this time as a family. We try to make dinner together. Then I work with my kid on his homework. (It’s amazing the amount of homework a 2nd grader gets, but that’s a blog topic for later.)
8.00 PM to 8.30: Reflection and Brain Work
I do not meditate in the evening. Instead, I sit down and reflect on the whole day. It’s amazing how much you learn and improve if you spend 15 minutes just sitting in a quiet place and reflecting on your day.
Next I create some work for my brain. It’s a well-known fact that the brain works as we sleep. So it’s best to assign it some work. For me, the following has been working well: I make a bulleted list of the things I need to write in the morning. I think of them like tags. I find it best to write it down instead of typing on the computer.
Alternately, I look at some programming / algorithmic issues. Again, I write or sketch it down. It’s amazing how often I end up with a solution the next morning! For these tasks I keep a nice, unlined, letter-size notebook. Something about writing on a blank sheet of white paper makes me more creative. I hit the bed between 8.30 PM to 9 PM. The earlier the better.
So that’s my daily schedule. It changes when I travel, of course; I spend a lot of time on the road for work. I have also not covered what I do on the weekends. But we’ll get to those things in future posts.
I would love to hear from others on what type of schedule they keep and what they find productive.
Jan-11 Edit : It looks like I am not the only one who gets up at 4.30 AM. 23 Successful People Who Wake Up Really Early