Coupling, Cohesion, and the Cost of Change

The two forces every architectural decision balances.

0/1 done

Theory

Architecture is the art of deciding what depends on what.

  • Coupling — how much one module knows about another.
  • Cohesion — how tightly the responsibilities inside one module belong together.

Healthy systems push for high cohesion, low coupling. Every "clean code" rule, every pattern in this track, is ultimately a tactic for shifting that balance.

Key idea: the cost of a change is roughly proportional to the coupling between the modules it touches.

Analogy

A kitchen is high-cohesion: everything in it relates to preparing food. A junk drawer is low-cohesion: batteries, rubber bands, and old keys live together because nobody knew where else to put them. Codebases full of junk drawers are the ones we dread changing.

Reflect

Think about the last change you made that took longer than expected.

  • Which modules did the change touch?
  • Were they coupled by data, by behaviour, or by deployment?
  • Which one of those would you decouple if you could?

Reading in progress · 0 of 1 activity done