Software Design: Tidy First?

Cohesion: ...And Elements That Aren't Coupled Go Elsewhere

Kent Beck's avatar
Kent Beck
Nov 15, 2022
∙ Paid

Coupled elements should be sub-elements of the same containing element. That's the first implication of cohesion. Shovel all the manure into one pile.

The second implication of cohesion is that elements that aren't manure (well, that aren't coupled) should go elsewhere.

For example, suppose we have a module containing 10 functions. Three of those functions are coupled. Where do the other seven go?

Incohesive element made more cohesive either by (top) extracting a cohesive sub-element or (bottom) by moving uncoupled sub-elements elsewhere.

You have two options.

User's avatar

Continue reading this post for free, courtesy of Kent Beck.

Or purchase a paid subscription.
© 2026 Kent Beck · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture