

Detecting Refactoring Diligence - michaelfeathers
https://michaelfeathers.silvrback.com/detecting-refactoring-diligence

======
striking
This may be a good statistic for the specific case of refactoring, but "Lines
of Code" actually mean nothing except as an approximate measure for the amount
of work done in a piece of code. [1][2]

And as Charles Babbage will helpfully tell you: garbage in, garbage out. [3]
This may be a useful estimate at one time or another, but posting this on a
wall harkens back to the old practice of managers measuring LoC to identify
best-performing employees. (And as we learned, it didn't work. [4])

[1]: [http://www.callingshotgun.net/geekery/lines-of-code-
dispelli...](http://www.callingshotgun.net/geekery/lines-of-code-dispelling-
the-myths/) (admittedly over the top /me shrugs)

[2]:
[http://www.imdb.com/title/tt0107290/quotes?item=qt1546480](http://www.imdb.com/title/tt0107290/quotes?item=qt1546480)

[3]:
[https://en.wikipedia.org/wiki/Garbage_in,_garbage_out#Histor...](https://en.wikipedia.org/wiki/Garbage_in,_garbage_out#History)

[4]: Those who cannot remember the past are condemned to repeat it. (from
[https://en.wikiquote.org/wiki/George_Santayana](https://en.wikiquote.org/wiki/George_Santayana))

~~~
michaelfeathers
I agree that LOC is a lousy productivity measure but I think think it could be
decent health measure.

The distribution of method line counts looks like it's a power law. In code
bases I've looked at there are way more methods with one or two lines - the
distribution tapers down to the couple of large methods we all have in our
code. My guess is that the coefficients of the distribution tell us something
about health. I've seen some very good code with distributions that taper down
very quickly.

No, I really think you have to separate LOC as a productivity metric from
these other uses.

------
therealdrag0
Why don't you post the source of the script you ran against your repository?
I'd like to run it against mine.

