Domain Re-discovery Patterns for Legacy Code
summary
Patterns and a toolkit for excavating domain meaning from messy code: mine the repo with name and dependency metrics, visualize files as metric buildings to spot investment and complexity hotspots, use commit co‑occurrence analysis (temporal coupling) and Dependency Cruiser to find tangles, add activity logging and a legacy toggle to identify live vs obsolete paths, create characterization tests via inverse object mothers and a test DSL, and progressively refactor ownership and conformance; visual tools work on toy projects but struggle on large customer codebases.
AI-written summary · about
chapters (22)
- 0:00Introduction to patterns
- 1:26Passive and active patterns
- 3:52Dirty but useful patterns
- 7:15Metrics and naming process
- 9:42Code tag clouds
- 12:31Strong code tag clouds
- 14:23Visualizing metrics
- 17:14Component-based focus
- 17:51Complexity investigation
- 20:43Managing complexity
- 22:37Knowledge silos and sharing
- 25:14Coordination bottlenecks
- 26:35Dependency graphs
- 28:32Connascence explained
- 34:46Refactoring via connascence
- 37:23Temporal decoupling
- 39:00Entity ownership
- 40:41Domain intent and testing
- 43:34Inverse object mother
- 45:50Outside-in testing with DSLs
- 47:28Architecture and communication
- 49:41Hidden cost of rewrites
