Re:What Makes Code Hard to Read: Visual Patterns of Complexi...
by ninetyninenine on Tuesday March 11, 2025 @08:54PM
(#43338858)
I meant code within the snippet is tightly coupled. You can't just cut the for loop in half and reuse half the logic.
if you have two functions, they're not coupled. you change one, the other stays as-is
if you refactor it so that they both call a third function, they're now coupled. you can't change the part they have in common without either changing both, or uncoupling them by duplicating the code
(you often want that coupling, if it lines up with the semantics)