O'Reilly logo

Your Code as a Crime Scene by Adam Tornhill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required