Most of the time, we have a flat view of our code. We open a file and look and all we see are classes and methods. What we miss is what has been happening to them lately.
We can look through version control logs, but that, again, only gives us a small view. There are things we could miss. For instance, are there methods that, in the haphazard dance of update by multiple committers are never reduced in length?
A while back, I decided to write some code to help me figure this out in Ruby:
To be fair, this only a small part of it.
What I've done is ripped through the git log of a Ruby project and run a parser on each file that has been changed. When I do that, I generate 'method events' which represent the event of a method having been added, changed, or deleted. By collating that data, I can see a history of all the methods over the life of the project. Once I have a database of that information (a CSV file, really) I can load the data and perform queries like the one above.
The code snippet gives you a list of all of the methods in your codebase that have increased in length over the last N commits that have touched them.
Presented with that information, people might even act upon it.