← Lessons

quiz vs the machine

Gold1360

System Design

Cohesion and Coupling

Why good designs keep related things together and unrelated things apart.

5 min read · core · beat Gold to climb

Two forces in every design

Cohesion measures how closely the parts inside a module belong together. Coupling measures how much one module depends on the internals of another. Good design aims for high cohesion and low coupling.

Why high cohesion helps

  • A cohesive module does one clear job, so it is easy to understand, test, and change.
  • Related changes land in one place rather than scattering across the system.

Why low coupling helps

  • Loosely coupled modules can change independently because they interact only through stable interfaces.
  • A change in one module does not ripple unexpectedly into others, which keeps the blast radius small.

How they relate

These two forces reinforce each other. When you group things by what changes together, modules become cohesive inside and the dependencies between them thin out. Split things along the wrong line and you get the opposite, scattered logic and tangled dependencies.

Draw boundaries where the dependencies are naturally thin.

Key idea

High cohesion keeps related logic together and low coupling keeps modules independent, so changes stay local and predictable.

Check yourself

Answer to earn rating on the learn ladder.

1. What does high cohesion mean for a module?

2. Why is low coupling desirable?