Posted in
Software Engineering, Technology
Thursday, March 16, 2006
Management might want to measure how productive their computer professionals are. One way to determine this is to count the lines of code (LOC) that have been produced. The term KLOC means ‘a thousand lines of code’. The thinking is that the more KLOC written, the more productive the team is. Lets take a moment to examine this more closely.
Do comments count toward the KLOC count? If not, why do you wish to penalize programmers for documenting their work? If yes, is a developer who writes a two hundred lines of comments accomplishing more than a coder who wrote fifty lines of code?
It may seem counterintuitive, but a programmer who writes fewer KLOC may actually be good for a project. Writing good software is a matter of managing complexity. An experienced developer will identify code that does the same work and will refactor the code to eliminate redundancy. So, eliminating lines of code is actually a good thing for a project. It helps reduce complexity which improves the time it takes to make code fixes.
There are better ways by which to measure productivity. One such method is to measure project hours. Project tasks are written down in a schedule called a work breakdown structure. Then an hour estimate is assigned to each task. Before a project starts the developers review the schedule and make any adjustments. Then developer productivity can be measured against how closely they follow the schedule.
Onions to the KLOC, orchids to project hours! Agree? Disagree? I’d love to hear about it.
