Re:When you combine two things that are close, but not the same
by F-W-M on Friday April 14, 2023 @02:03AM
(#35566020)
It requires good familiarity with code base or domain knowledge to know that one has to grep and for how long. The abstraction triggers you to look at the right places.
That said, I am firmly in the camp that requires at least three instances.
Taking a bunch of duplicated but "flat" code and creating an abstraction around it gets easier the more copies of the code you have because you have a more complete picture of what the right abstraction actually is.
Code is like clay, once it DRYs it stops being malleable.