Posted on 13/8/10 by Felix Geisendörfer
This is post #2 of my programmer productivity series.
Before I embark on trying out various productivity strategies, I need to establish a set of metrics that will help me understand what works, and what doesn't.
For now I decided to keep track of two things:
- My time, using a daily journal where I enter every task I am working on, and the time spent on it.
- My commits, as well as the lines of code I add / delete throughout my day
If you want to follow along, I am using a simple notebook for my time tracking. I write one task per row, using the following format:
- 09:23 - 09:26 Coffee & Planning today's tasks (3m)
- 09:26 - 10:30 Work on setting up new server (1h 3m)
By writing out the time I start and end my tasks, it's pretty hard to miss an item.
As far as commits are concerned, I whipped up a simple node.js script that you can download here. To use the script, copy it anywhere on your machine (maybe you like /usr/local/bin/gitloc ?), and then add it to your git post-commit template hook like so:
$ cat /usr/local/git/share/git-core/templates/hooks/post-commit #!/bin/sh /usr/local/bin/gitloc
This will automatically track the commits in all new repositories you create. If you want to track an existing repository as well, simply do "git init" in the projects root directory, and the template hook will be copied in.
The CSV file created by the script looks like this:
2010-08-12 17:00:09,8eb212e,Implemented initial map display,142,130,/Library/WebServer/Documents/tvype/portal 2010-08-12 18:34:22,1fa8859,Initial billing code,86,2,/Library/WebServer/Documents/transloader.transload.it
The columns after the commit subject are the lines added / removed. The last column is the path of the project the commit was made to.
As far as evaluating my time spent, I have come up with a simple system of classifying my task log entries into three categories:
- Productive work: I'm creating value for other people (clients, transloadit customers, etc.). If I did this all day, I'll reach all of my goals.
- Busy work: Answering emails, meetings, staring at the screen with little results, fixing bugs, even writing this blog post series (It's not productive work unless I'll make a living selling productivity advice, which I won't). If I did this all day, I'll end up getting very average results.
- Procrastination: Reading news, lunch (if longer than 30 min), checking emails in an unproductive way, playing games. If I did this all day I'd be homeless in no time : ).
Of course the lines are always a bit blurry. My advice is to assign a task the category you intuitively think of first. If you must, split the task up in 50% of each category. Skip to the bottom of this article to see my summary for yesterday.
Regarding the commit log, for now I'll simply count:
- Lines added
- Lines removed
- Projects worked on
Ideally I will strike a balance here. Never < 100 lines / day, but >= 1000 is way too much as well. This might be a "programmer productivity" series, but many of us have other tasks that would definitely get neglected if we only wrote code all day.
And here comes the promised analysis from yesterdays logs:
- Productive work: 4,03 h
- Busy work: 4,60 h
- Procrastination: 0,45 h
Time after 6pm: 1.5.h
274 lines of code added, 186 deleted in 3 projects
A few thoughts on those numbers:
- There was a 2.5 hour meeting with our client yesterday. That's the first time we had a meeting that long and hopefully the last time ; )
- I won't add "Procrastination" that happens after 6pm to the numbers. If I choose to work after 6pm, fine, but if I like to play instead that's cool. There is no reward for burning out.
- The 0,45 h procrastination are from a SC2 game I played with Tim after lunch. Damn you Blizzard ... . There was also 5 minutes of unproductive email checking / following a link to Facebook.
My next post will look into productivity killing patterns and habits and how to fight them.
I won't start setting specific goals until I have collected a little more data about my current productivity.
PS: My friend Mark Grabanski wrote a post on various productivity factors. Good thoughts, especially on the importance of "tools".
You can skip to the end and add a comment.
This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.