by recursivedoubts · 6y ago · 0 comments
I think a good way to improve the understandability of code is via something I am calling "Locality of Behaviour":
There should be a metric that indicates aggregate LoB for a codebase. Simplistically, cluster references of all entities (variables, functions etc depending on the language), calculate the overlap of those clusters and aggregate them. Track this metric over time and when it breaches a certain threshold, refactor until it’s back to where you want it to be.