September 05, 2003

Counting lines of code

SLOCCount - A Perlmonks post pointed me to this. Previously I’d just used wc to get a rough estimate. But that includes POD and other docs and I don’t care enough about the figure to create something better. This program filters out comments and seems to work for more than two dozen languages. Cool.

More interesting but of dubious value are some value metrics it generates. Running this program against the OpenInteract2 source tells me that I have 34,400 SLOC, and using something called a COCOMO model it estimates:

  • ...development time in person years: 8.21
  • ...schedule: 1.19 years
  • ...average number of programmers: 6.89
  • ...cost to develop: US$ 1,109,416

Obviously to be taken with a large grain of salt :-)

BTW, the SLOCCount author David Wheeler is not the same one who gave an excellent presentation on Bricolage on Tuesday. That threw me for a second...

Next: Changing policy through the courts
Previous: 'Suddenly, Mike the Vegan pounced'