4 ms·
Does anybody do coupling and cohesion any more? That was always the dividing line I was taught. A cohesive function you could name to increase the abstraction
by neilwilson 6y ago
Does anybody do coupling and cohesion any more?
That was always the dividing line I was taught. A cohesive function you could name to increase the abstraction level and stop your brain overloading.
- brundolf 6y agoSomething I didn't appreciate until several years into my career is that even decoupling has a cost. By adding a layer of abstraction, you're making a bet that the mental overhead of tracking that new idea is smaller than the mental overhead of tracking its implementation directly. You're introducing a new concept that the programmer didn't have to think about before, in hopes that it allows them to ignore a larger set of information some of the time. For tiny functions, especially if their concept isn't already familiar to the programmer, this may often not be a good tradeoff.