#13 Describe method for LOC

open
nobody
5
2007-03-21
2007-03-21
Owen Carter
No

StatSVN presents a lot of numerical information regarding LOC changes, deltas etc.. LOC is a potentially ambiguous term, developers and organisations can have differing interpretations of it.

It would be useful if there was some discussion of methodology for this available to end-users. Eg.
How are lines of code determined?
- eLOC? iLOC? wc?
- Whitespace ignored?
- Code language neutral? / Parsed for common languages? (If so; which ones? with/without comments?)

This does not necessarily have to be on the actual pages themselves, but maybe a link to a 'Method' help page could be incorporated in the results sections. Whilst this info may be available via the StatCVS site, or the whitepaper, most end users would not make it that far. And one target audience for the StatSVN output, middle management, almost certainly needs a cluestick.
- This would also be a good place to note any caveats (eg. binary files being considered to have 0 lines of code).
- You could even add some outside reference, eg: http://en.wikipedia.org/wiki/Lines_of_code

Discussion

  • Jason Kealey
    Jason Kealey
    2007-03-23

    Logged In: YES
    user_id=1498924
    Originator: NO

    For the moment, we measure physical lines of code; language independant (similar to wc -l). Whitespace is not ignored. Comments are not ignored. StatCVS computes the LOC in the same way, but since we're contacting the repository, we have the possibility to implement other models.

    My personal opinion is that LOC should not be the basis of any profound analysis. We have the simplest form of LOC implemented in StatSVN that's enough to give you an overview of what's happening. Regardless of the method, if the method is known, developers can cheat the metric. Yes, the metrics are artificially inflated by whitespace and comments, but hopefully the inflation is uniform across the codebase.

    In any case, I agree that a simple mention of the method would be useful.