Files
local-cal/.claude/skills/tdd/deep-modules.md
Dmytro Stanchiev 35a7f0a7c2 ai skills
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
2026-04-06 20:48:30 -04:00

1.2 KiB

Deep Modules

From "A Philosophy of Software Design":

Deep module = small interface + lots of implementation

┌─────────────────────┐
│   Small Interface   │  ← Few methods, simple params
├─────────────────────┤
│                     │
│                     │
│  Deep Implementation│  ← Complex logic hidden
│                     │
│                     │
└─────────────────────┘

Shallow module = large interface + little implementation (avoid)

┌─────────────────────────────────┐
│       Large Interface           │  ← Many methods, complex params
├─────────────────────────────────┤
│  Thin Implementation            │  ← Just passes through
└─────────────────────────────────┘

When designing interfaces, ask:

  • Can I reduce the number of methods?
  • Can I simplify the parameters?
  • Can I hide more complexity inside?