4 ms·
> it is _much_ easier to refactor copy pasta code So long as it remains identical. Refactoring almost identical code requires lots of extremely detailed starin
by pjc50 5y ago
> it is _much_ easier to refactor copy pasta code
So long as it remains identical. Refactoring almost identical code requires lots of extremely detailed staring to determine whether or not two things are subtly different. Especially if you don't have good test coverage to start with.
- tuatoru 5y ago> requires lots of extremely detailed staring Yeah, nah. There are diffing tools.
- cerved 5y agoproblem is you only diff if things look different
- macNchz 5y agoI personally love playing the game called "reconcile these very-important-but-utterly-without-tests sequences of gnarly regexes that were years ago copy-pasted in seven places and since then refactored, but only in three of the seven places, and in separate efforts each time".