What are Coupling and Cohesion?
A story about how tangled chapters are with each other, and how unified each chapter is inside.
Fixing chapter 2 forces a rewrite of chapters 5 and 7 too.Fixing one chapter forces edits in others when chapters are too entangled.
Unrelated topics are mixed together inside one chapter.Readers can't tell what the chapter is even about.
Keep chapters loosely linked to each other, but unified within.The two chapters link only through the table of contents — neither needs the other's details.
On the left every chapter links to every other; on the right, each links only to its neighbor.Fewer lines between chapters mean lower coupling; one dot color (topic) inside a chapter means higher cohesion.
Zero coupling and perfect cohesion aren't realistic.The coupling goal isn't zero — it's "just enough, no more."
Coupling measures how tangled chapters (modules) are with each other; cohesion measures how unified a single chapter is inside. Good design aims for low coupling and high cohesion.
Coupling is the degree of interdependence between modules — the lower it is, the less a change in one module ripples into others. Cohesion is how focused the elements inside one module are on a single responsibility — the higher it is, the easier the module is to understand and reuse. Low coupling and high cohesion is a foundational principle of good software design.
When grown-ups say it
- Coupling
- How entangled chapters are with each other. The lower it is, the less a fix in one chapter touches the others.
- Cohesion
- How unified a chapter is around one topic. The higher it is, the easier the chapter is to understand.
- Modularity
- The act of splitting a book into chapters at all. The premise that makes coupling and cohesion meaningful.
- Interface
- A chapter's "entrance" — its title or table-of-contents entry. Hides the details, exposes only this.
- Information Hiding
- The principle of showing only what's needed and hiding the rest. A concrete technique for lowering coupling.
- Product Line Engineering
- Core assets need to be split well for reuse to work. Coupling and cohesion are used directly when designing core assets. → same template, different covers
- Conditions of Good Software
- Coupling and cohesion tie most directly to maintainability. They underpin maintainability, one of those conditions. → what makes a good book
- Design Pattern
- A proven solution that helps achieve low coupling and high cohesion. The GoF patterns are the best-known set.