Friday, October 19, 2007

Developer Activity Tracker

On my current project, we are using Subversion for source control. Recently my lead and I were discussing how we might measure how much each team member is contributing to the project. A bit big-brother-like, I know. But on a project where everyone is super busy and your resources are located on different continents, it is easy to lose track.

A bit of research into the svn command-line utility yielded the following command:

svn log -rxxx:yyy -v --xml > log.xml

where xxx and yyy represented the global revision numbers spanning a particular iteration of our product.

I then wrote a little Python script using the xml.dom.minidom parser to parse and collate the results, and came up with a simple scoring system. For each item committed into Subversion, a point is earned. If a developer commits the same file twice, he earns two points.

The script tallied up and spat out the total points for each developer. I then pasted the output of the script into an Excel spreadsheet, added a row to sum up the total points, and computed the percentage of points earned per team member.

So, one might wonder what the score represent. In my mind, it is simply some representation of activity, which roughly translates into productivity. There is some work that goes into earning each point. I can query Subversion further to find out the amount of code change made for each point earned, but that will require more wading through the repository.

However, I think a simple and useful follow-up exercise would be to plot the number of activity points earned by the entire team per unit of time (like per 24-hour period). As inspired by Steve McConnell, the result should be some sort of bell-shaped curve. As it approaches zero on the right-hand side, it can be a good predictor of when we are going to be done with an iteration. If the curve drags on and on to the right, it will mean something is wrong. This can mean we ran into trouble with implementing a particular feature, or it can be, heaven forbid, feature/requirement creep.

Furthermore, I think if we plot this for each developer, it can be used to gauge whether a team member's productivity increases over time as well as relative productivity amongst developers.

This system is by no means accurate nor cheat-proof. But I believe it is better than nothing. Also, as a team, we have to trust that its members won't sink to the depth of doing useless work in order to pad his activity score.

No comments: