![]() |
![]() |
![]() |
Statistics - reading code vs. writing code I'm looking for some quotable statistics for some marketing materials. I highly suspect that many developers spend more time reading code (looking for bugs, or just plaing maintenance) then writing new code. Does anyone know where I might find some quotable statistics about this? ...or to the contrary, if I'm incorrect. Something like an academic paper or other reference-able source would be great.
JT
I just finished reading Code Complete by Steve McConnell and I'm pretty sure ha gave some statistics in there. Unfortunately I don't have it here right now...
sgf
"And for that matter, what about yourselves? Do we spend more time reading existing code, or writing new code?"
Tom Vu
Not to sound like a famous politician, but it depends on what we mean by "read."
MSHack
The *time* spent reading while writing is, I think, attributable entirely to writing. If you insist, adopt a simple rule that says that, on a first day a line of code comes into existence or is modified, you attribute the time it took entirely to writing; From that moment on, every time you read it, it's reading.
Ori Berger
Not necessarily on reading code, though.
Brad Wilson (dotnetguy.techieswithcats.com)
The 10 lines per day is an average for production-ready code, not including comments or whitespace. The "days" includes the time in design, and the testing and debugging as well as other activities like meetings, brainstorming, and requirements gathering.
T. Norman
Ori, where did you hear 10 per hour? Last I heard was 13 per day average and 40 for top producers. Those numbers are surely old though and I have suspected productivity is higher now and have been looking for some decent stats. Thanks.
Dennis Atkins
And yes, it's understood that these are averaged out across total effort over a year and its non-space non-comment.
Dennis Atkins
Those numbers are also net of rewrites and deletions. If you write 500 lines, then subsequently modify 100 and remove 200 of them to make it production ready, it counts as just 300.
T. Norman
40 lines for "top producers"?
T. Norman
JT, there are many different types of developers. Maintenance programmers and oss people will spend most of their careers reading code. Developers will spend very little because they create new code.
me
I agree with T. Norman. Better developers tend to write less code, not more. They also tend to relish in ripping out code whenever possible.
Brad Wilson (dotnetguy.techieswithcats.com)
Still, in extreme cases the top developers probably do write more lines of code per day AND get more functionality per line. Otherwise Doom would probably still be unfinished if they were working at a 10-20 LOC/day rate.
T. Norman
Maybe you've never worked with crap developers, T Norman. These are people who will cut and paste huge blocks of garbage, fiddle with it till it sort of does what's required, then have a great talk with the project manager. They're usually good talkers.
me
I'm happy to see someone ask this question.
Pakter
|