Push Back, Finally!
The release of the Cohesion chapter spurred a 50% increase in subscribers. Welcome! Glad to have you here & talking about software design.
The release of the Cohesion chapter also spurred something I’ve been waiting for—push back. Some commenters, particularly on Twitter, didn’t much like the definition of cohesion (for review, an element is cohesive if its sub-elements are coupled). The alternative appears to be putting together elements that are “functionally related”.
Here’s what I don’t like about that definition—what does it even mean? We can tell whether 2 elements are coupled—they have historically changed at the same time. They may be about to change at the same time, in which case we have a Tidy First? question to ask. But we know what coupling means.
“Functionally related” could mean anything. I have put elements together where understanding one element is necessary in order to change another. That makes some sense. But just, “Seems to me like they go together,” is a recipe for conflict & missed opportunities for design improvement.
Whence comes this push back, really? I can think of a couple of incentives:
Someone has a design that isn’t working well. Accepting a new criterion for cohesion would force them to rethink their design. “When I add a feature I have to change this layer & that layer & that layer”—you have the layers wrong, or to be less judge-y, you have an opportunity to improve the design.
Someone has status because they have gotten to dictate the design. Sharing responsibility for design (they fear) would reduce their status.
I’m wrong for suggesting coupling of sub-elements as the criteria for grouping. Giving more latitude to designers would result in better designs.
My first 2 options above are pretty negative, ascribing questionable motives. Why the hate? Well, because in trying to make sense of ad hominem, condescension, & ipsedixitism, I have to go a ways down the list of motives to find ones that seem to fit.
That said, push back is good. It brings energy to the topic. It sharpens descriptions. It refines ideas.