There are many ways to make changes in an existing code base. Some are better than others.
Some teams produce what I call a festering code base. In a festering code base, the team changes the code primarily by adding code to existing methods and adding methods to existing classes. The results are predictable. Classes and methods grow malignantly, eventually becoming thousands of lines long.
Better teams produce budding code bases. Developers create new classes and methods and delegate work outward. Periodically, they collapse structure back into a simpler form, but the dominant trend is to grow the code by creating new structure.
These distinctions are qualitative, but they are measurable. You can look back at the the change history of a code base and get a sense of how changes occur. What is the ratio of new class and new method addition to change?
Budding code bases generally consist of classes that adhere to the Open/Closed Principle. The code grows outward. Festering, on the other hand, is stagnation. New code grows in the same space as old code, suffocating it.
What causes festering? Well, I think it is a direct result how of relative cost affects changes in code. It simply costs more in effort to add a method to a class than it costs to just add code to an existing method. Likewise, it costs more in effort to create a class than it costs to add methods to an existing class. The fact that we know that budding code is more cost effective over time doesn’t change the perception of the cost at the time of change.
We can be diligent and try to fight this tendency, and we should, but I wonder sometimes whether we can change the incentives by doing something clever with language design and IDE design. What would life be like if it were easier to create budding code rather than festering code? Can we change the cost structure so that this is possible? Moreover, if we can, would we just be producing another problem: overly budded code which is hard to maintain for different reasons. But, given what we know about how code often turns out today, it seems worth trying something different.