Code has mass has another interesting corollary: large enough collections of code tends to almost gravitationally attract more code. This results in god classes and those huge libraries of diverse functionality that usually go by the name "misc" or "util".
The mechanism for this is fairly obvious: it is usually convenient to put new functionality next to existing one because it allows you to reuse things that maybe should not be reused. The more diverse a big lump of code, the more potential future functionality is convenient to add to the lump.
This is a reason to be very vigilant against this type of accidental reuse and incohesive modules. It's a reinforcing feedback loop that needs a balancing mechanism.
No I dont think that follows. Forces don't cause accelerations. But attention is required for understanding.
> Every additional line of code you don’t need is ballast. It weighs your codebase down, making it harder to steer and change direction if you need to
So code as mass is the scalar part of the momentum. So the directional part is where this code is going in "purpose space".
The mechanism for this is fairly obvious: it is usually convenient to put new functionality next to existing one because it allows you to reuse things that maybe should not be reused. The more diverse a big lump of code, the more potential future functionality is convenient to add to the lump.
This is a reason to be very vigilant against this type of accidental reuse and incohesive modules. It's a reinforcing feedback loop that needs a balancing mechanism.