views:

65

answers:

3

Hi,

If there any implied meaning of a high or low ratio of Physical to Logical SLOC? Does it means anything like bad programming style or something merits consideration?

Below is the metric of our codebase got from CodeCount. It is good or bad ratio ? Or it does not matter.

  1510738  CODE  Physical
   889284  CODE  Logical
   Ratio of Physical to Logical SLOC............................     1.70
+1  A: 

It probably means that developer(s) likes to put braces on a single line.

Most likely explanation from reading the Wikipedia page on SLOC

Pascal Cuoq
+2  A: 

I personally think metrics like SLOC are becoming less and less important as more code is generated by frameworks automatically (e.g. Ruby on Rails).

Plus, don't forget that your programmers will react to whatever metric you use to judge them in ways you may not intend. In this scenario, they could figure out how to write code that gives a high Physical/Logical ratio to the detriment of good programming sense (e.g. using generated code).

LWoodyiii
+2  A: 

There's nothing wrong with what you see there. In fact, I'll so far as to say that your choice of a language will have as much of an impact on that ratio as your coding format. I'd also like to add that a much better metric would be to measure SLOC to functionality. That metric is by far a better guide to your development standards as large SLOC to functionality ratios typically imply redundant code.

wheaties

related questions