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:
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:
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.
Analysis
As far as evaluating my time spent, I have come up with a simple system of classifying my task log entries into three categories:
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:
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.
Yesterday's Productivity
And here comes the promised analysis from yesterdays logs:
Time after 6pm: 1.5.h
274 lines of code added, 186 deleted in 3 projects
A few thoughts on those numbers:
Coming next
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.
--fg
PS: My friend Mark Grabanski wrote a post on various productivity factors. Good thoughts, especially on the importance of "tools".