jargon

Comparison

Divergent changevsShotgun surgery

Divergent change

the same class is edited for tax rules, for the export format and for the retry policy, by three different people.

One module changing for several unrelated reasons, meaning several responsibilities have collected in it. It is the single-responsibility principle stated as an observation rather than a rule, and the evidence is in the version history rather than the code. Splitting along the lines the commits reveal is more reliable than splitting along the lines a diagram suggests.

Full entry →

Shotgun surgery

adding one field meant small edits in eleven files, and the review caught the two you missed.

The inverse of divergent change: one conceptual change requiring small edits scattered across many modules, because the concept has no home. It is the most reliable measure of bad decomposition, because it shows up as effort rather than as opinion. The fix is to gather the scattered pieces into one place, which is exactly what package-by-feature is arguing for at a larger scale.

Full entry →

Related comparisons