How does a programmer spend his time?
I just read an interesting post about programmer productivity in Peter Hallam's blog. Peter is a developer for Microsoft; I found his blog via Jeff Atwood's Coding Horror blog. Peter is writing about how to make programmers more productive and suggests that all the emphasis on helping programmers write new code faster is misplaced, because programmers don't really spend much of their time writing new code. His estimate is that the typical developer spends about 5% of his time writing new code, 25% of his time modifying old code, and 70% of his time understanding code he needs to modify. Atwood's posted a nice graphic of this division of labor. Once you realize where the time is being spent, you realize that tools that speed up the writing of new code have very little impact on overall productivity - while anything that make old code more readable and understandable leads to big improvements. Peter uses this argument to suggest his employer is focusing on the wrong features in Visual Studio, Microsoft's flagship development environment. The 5-25-70 task breakdown also explains why programmers so often make utterly unrealistic estimates of how long a task will take them. They estimate it as if they were writing a tiny application from scratch. But in actuality they are modifying or enhancing an application they need first to understand. You've seen those developer tool demo's where the salesguy writes an entire self-contained application from scratch in 30 minutes. Peter writes: This does not even remotely resemble real world professional coding. The last time I had a coding project like that I was in college. Early in college. A much more representative task would be to send a coder an existing piece of code that they'd never seen, that was undocumented, badly written, badly architected and had several bugs. Then tell them to add a new feature while maintaining the existing behavior as much as possible.I think anyone who has worked professionally on large applications will recognize this scenario. We just don't usually recognize its full implications. Tagged: nptech, programming Labels: nptech, programming |
Comments on "How does a programmer spend his time?"
Thanks, Michael, for a good article, and very good points. It's important for me to remember how it is I often spend my time and how easily I can underestimate how long something will take me. One quibble - some of us programmers are "she's". :-)