How it works · 4 of 49 Core

What are coupling and cohesion in software design?

Why one change ripples

Coupling & cohesion: Coupling is how much one part has to change when another does; cohesion is how much the things inside one part belong together; low coupling between parts and high cohesion inside them keep a change small.

Loading the animation…

Say it like this Keep what changes together in one place and join places through one narrow hatch, so a change stays small.

Under the hood — for builders
Real case: six matched pairs, measured
Harvard researchers paired products that do the same job, one built by a loosely coupled organisation (open source: many contributors, many companies, many countries) and one by a tightly coupled one (a single commercial team, mostly at one site). They measured propagation cost: the share of files a change to one file can reach, directly or through others, on average. Every pair went the same way:
Run here: this card's two webs, measured the same way
Propagation cost, as in the paper: write the "uses" threads as a matrix, add up its powers to find every part each part can reach through any chain (the visibility matrix), and take the share of cells filled. Computed for the scene's webs:
The words
Coupling: how much one part must change when another does. Cohesion: how much the things inside one part belong together (change for the same reason). Hatch: the one interface other parts may use; everything behind it can change freely. Fan-in: how many parts use a given part; high fan-in parts should change least.
What raises coupling
Shared database tables · reaching into another module's internals · one "utils" or "common" module everything imports · chatty calls that pass whole objects · cycles (A uses B uses C uses A), which make every part in the loop reach every other.
Measure it
Draw the dependency graph from the code (madge for JavaScript, pydeps for Python, jdeps for Java) · count cycles · files touched per typical change, from version history · how often two modules change in the same commit.
Watch out
Splitting a tangled app into services keeps the tangle and adds a network to it (C6, the distributed monolith). Regroup by what changes together first, then split. And look at the organisation: the paper's pattern follows who talks to whom (A5).
Sources
MacCormack, Baldwin & Rusnak, Research Policy 41(8), 1309–1324 (2012), Tables 2 and 4, read in the author's manuscript on Harvard DASH · propagation cost computed for this card's webs, Python, 18 Nov 2026.

What happens in the coupling & cohesion animation, step by step?

  1. Twelve parts of a shop's app, hung in one web. Each thread means one part uses another.
  2. Your turn: change one part. Tap it and see how far the change reaches.
  3. Tangled: the change runs back along every thread that uses it. Each part that lights up is one more thing to re-test and one more owner to ask.
  4. Re-spun: parts that change together share a small web, and the webs meet at one hatch each. The same change stops at the hatch. Tap others to try.
  5. Harvard measured matched products doing the same job. In a commercial finance app, one change could reach 47% of the files on average; in its open-source match, 7.7%.
  6. Look at who built each. One company at one site, where everyone talks to everyone, built the tangled one; 138 people in 27 countries, talking through narrow channels, built the modular one. Next: why.

What everyday example explains coupling & cohesion?

A restaurant kitchen. The pastry station keeps its own tools, oven and recipes together (cohesion), and passes plates to the front through one hatch. Put every knife in one central drawer instead, and moving the drawer stops every cook at once (coupling).

Why should a team care about coupling & cohesion?

When estimates keep growing and every change needs a meeting, count how far a typical change spreads before you blame the team. Regroup by what changes together, then split.