Most of the shitty code I've seen has been from poor attempts at reducing code duplication, usually resulting in some overfitted generalized solution or abstraction.
Efforts to reduce duplication should be focused on chunking out reusable pure functions. Trying to dedupe the flow of logic is almost always a fool's errand.
Efforts to reduce duplication should be focused on chunking out reusable pure functions. Trying to dedupe the flow of logic is almost always a fool's errand.