Friday, January 19, 2007

Programmer Productivity

Robert Martin has a post about how 10% of programmers write 90% of the code. I think this is more-or-less accurate, but he seems to think that whether a programmer is a member of the elite or not is an innate quality -- that there are good programmers and poor programmers, and nobody ever moves between the two groups.

I have worked on projects where I've been in the elite, and I've worked on projects where I've been in the middle, and on occasion I even qualify as a Waste Of Space for a month or two. There are several factors that influence how productive I am, personally.

First, the fewer developers in the group, the better. This is more than just being a big fish in a little pond, it's about feeling responsible for the code. If I'm in a group of 20, my contribution doesn't matter as much as if I'm in a group of four, so I don't care as much.

Second, distractions must be minimized. I enjoy helping people and answering questions, but they really cut into my concentration. Unfortunately, it's rude to ask people to use email instead of popping over for a visit or sending an instant message. Also, if I'm in an environment where I have meetings every day, scheduled such that they break my time up into hour-long chunks, then my attention is guaranteed to wander. For this reason, I tend to work best at night.

Third, history and familiarity with the code is very important. In code I've written and/or rewritten, I'm extremely productive. In code that I'm unfamiliar with, I'm not. It also helps a lot if the person who did write the code is willing to take the time to answer questions, without getting irritated. I also find that different people write the same program in vastly different ways, and if you're working on a codebase that was architected very differently from the way you would have done it, it can be difficult to ever get comfortable.

Fourth, management is important. For example, I need to feel just enough time-pressure to make me pay attention, but not so much that I give up in despair. I also need to get feedback as to how my work is perceived by users (did it suck? did it rock?) otherwise my work starts to seem pointless and I lose motivation.

Fifth, I find that my productivity has ceased to improve noticeably over time. For the first two or three years it improved dramatically, but since then I seem to have plateaued. (I currently have eight years of professional programming experience.)

If you work with someone who you think is being unproductive, perhaps you should spend some time to find out why. You might find that a very small change in their work environment can lead to a large improvement in their output. Maybe they just want to know that their code is actually useful to someone. Maybe they need free snacks, so their blood sugar doesn't get too low in the afternoon. Maybe the need to work in a quieter part of the office.

Discovering and addressing these kinds of things should be 50% of what a manager does. The other 50% should be facilitating communication both within the group and with other groups.

"Woeful Wails" - My Dad's account of what happened in 1989 at Srinagar, Kashmir

A Shiver, a shudder goes down my spine To have lost what once was mine The merciless devils who strode the streets With guns pointing at u...