Sometimes I’m consulted with refactoring a legacy RoR application that I’ve never seen before. That’s when an informed use of certain code metrics can come in very handy:
Several authors have shown that the two-dimensional space generated by churn (the frequency of change of a certain file or other code entity) and complexity (e.g. cyclomatic complexity or a similar metric) conveys meaningful information about code quality.
Using this metric I can obtain a quick glance at the pain points in a codebase, and know where to look first to understand the application’s tech debt issues.