Actually, I think LOC is a pretty meaningless metric, since
coding style can affect it _a_lot_, eg, putting opening braces
in a line by itself, breaking long lines, etc.
NCSS (Non-Comment Source Statements) is a much more
useful metric (roughly the same as counting '{' and ';'). See http://www.kclee.com/clemens/java/javancss/ for more
information.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It would be better to allow the user to specify different
preferrences when counting LOC. For example, count only
NCSS, or count all lines including/excluding blank
lines/comments/variable declarations/importing statements...
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I like that approach from a user's standpoint, but the
downside is that it becomes hard to compare metrics for
different code bases generated by different users with
different settings. If some measure one way and others
another way you're comparing apples and oranges. Now at
least it's always measured the same way, good or bad.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=37483
Agree with Frank, I think this is very useful too.
Logged In: YES
user_id=58637
Actually, I think LOC is a pretty meaningless metric, since
coding style can affect it _a_lot_, eg, putting opening braces
in a line by itself, breaking long lines, etc.
NCSS (Non-Comment Source Statements) is a much more
useful metric (roughly the same as counting '{' and ';'). See
http://www.kclee.com/clemens/java/javancss/ for more
information.
Logged In: NO
It would be better to allow the user to specify different
preferrences when counting LOC. For example, count only
NCSS, or count all lines including/excluding blank
lines/comments/variable declarations/importing statements...
Thanks!
Logged In: YES
user_id=52904
I like that approach from a user's standpoint, but the
downside is that it becomes hard to compare metrics for
different code bases generated by different users with
different settings. If some measure one way and others
another way you're comparing apples and oranges. Now at
least it's always measured the same way, good or bad.