Analyze Temporal Coupling

In Chapter 7, Treat Your Code As a Cooperative Witness, we said that temporal coupling can be an interview tool for your codebase. The first step in an interview is to know who you should talk to.

Let’s use sum of coupling analysis to find our first code witness.

Use Sum of Coupling to Identify the Modules to Inspect

You’ve already seen that there are different reasons for modules to be coupled. Some couples, such as a unit and its unit test, are valid. So modules with the highest degree of coupling may not be the most interesting to us. Instead, we want modules that are architecturally significant. A sum of coupling analysis finds those modules.

Sum of coupling looks at how many times each module has been coupled ...

Get Your Code as a Crime Scene now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.