News for hackers. Stuff that matters.
Re:DRY is an over-rated programming principle? by eloff on Thursday July 07, 2022 @07:02AM (#32012440)
Exactly this. I fixed a problem like this a week ago. I found some duplicated code, factored it out into one place by introducing an abstract base class (Python) and in the process discovered one of the duplicated methods had a logic error leading to returning a slightly smaller integer result.

The code had test coverage, but the test confirmed that it produced the wrong result. I had to fix the test too.

Re:DRY is an over-rated programming principle? by TwoHeadedBeast on Thursday July 07, 2022 @07:19AM (#32012565)
So your refactor broke the tests, so you assumed the tests must be wrong.
Re:DRY is an over-rated programming principle? by 83457 on Thursday July 07, 2022 @08:27AM (#32013136)
So his refactor fixed a bug and broke a test which he fixed, so you assume he must have assumed instead of verified.