Crafting Code Podcast


$ cd episodes/009-coupling-and-cohesion

~/podcast/episodes/009-coupling-and-cohesion $ ls -1a
. .. episode-summary.txt
~/podcast/episodes $ cat episode-summary.txt

Coupling and cohesion are fundamental concepts in software systems. From types of coupling to Conway's Law, Matt and Allan (sans Dave) discuss how these two ideas can affect your day to day work beyond just the formal definitions.


[00:00:00] Host introductions. Formal definitions of coupling and cohesion versus how they affect you day to day. When something goes down, what goes down with it? What can you take away?

[00:04:50] Coupling example: molecular models / tinker toys. How you connect defines where you are rigid and where you can flex / turn. Another example: swiss army knife (or multi-tool).

[00:11:13] "Wouldn't it be cool if..." leads to coupling. Matt's multi-tool story. Cohesion and coupling can be emergent.

[00:17:22] You have to have some kind of coupling. You have to optimize / balance for your situation. Don't get lost in trying to manage coupling & cohesion, especially in a small project.

[00:24:37] There are many types of coupling. HTTP calls as a form of temporal coupling. What needs to be online at the same time for your system to work?

[00:31:00] Data coupling. Protect the structures that you care about, and use a translation layer (anti-corruption) on the edges There are reasons why breaking up the data is important, even if it is less convenient for data professionals.

[00:36:14] Is there value in measuring coupling? It can be a useful signal or lagging indicator, but don't be the static analysis cop. Remember you're seeing only a cross section of the system.

[00:40:43] Coupling and cohesion affect architectures. DDD & hexagonal architecture concepts. The database is incidental. Protect business logic.

[00:44:12] Anything that affects architecture also effects the people: Conway's Law. How do you organize your people for coupling & cohesion? Engineers who are in the code a lot can help design people orgs.

[00:49:34] Cohesion in organizations: how many groups do you need to involve to make a change? What are you trying to achieve?

[00:53:12] Matt's closing thoughts: Couple slowly and with intention. Too DRY can chafe. Don't get stuck trying to find the perfect decoupling or cohesion.

[00:57:29] Outro

~/podcast $ cat copyright.txt

Copyright © 2022 - Crafting Code Podcast