Your Code as a Crime Scene

Coupling between different batch programms

Coupling between different batch programms

In Your Code as a Crime Scene Adam Tornhill presents forensic techniques to find offending code. This figure shows the coupling between four different batch programs. Batch A, B, and C share common datastructures (Common Files) so it wasn’t surprising that there is a dependency between Common Files and Batch A and B. But why was there no dependecy to Batch C? Sometimes missing things can give deep insights…

But we did not expect the dependencies between Batch A, B, and C. What was the reason for this? The solution was surprising: Copied comments with a JavaDoc @link reference that changed during a refactoring… Upps.

And finally the dependency between Batch C and Batch D was a really big anomaly in our code, because these two batches have functional nothing in common.

Thank you, Adam, for your wonderful tool Code Maat.

The figure above is a coupling analysis on an architectural scale. The diagram is based on D3’s curved links layout. The distance between two nodes represents the coupling. A far distance means lesser coupling. The stroke width is the number of revisions from that coupling analysis (and the color is just to please you).

Dieser Eintrag wurde veröffentlicht in Blog von admin. Setze ein Lesezeichen zum Permalink.