News for hackers. Stuff that matters.
Re:That coworker who never stops refactoring by fiddlerwoaroof on Tuesday August 11, 2020 @10:56AM (#24120930)
I’ve inherited codebases like this, they almost always have subtle bugs because people changed something but missed the other place the logic needed to be modified. My thought is that functionally cohesive blocks of code should almost always be extracted to a function and named: if this causes a bad abstraction, you can always either duplicate the function and rename or inline the function and re-abstract.
Re:That coworker who never stops refactoring by LargeWu on Tuesday August 11, 2020 @11:04AM (#24121030)
I've had the opposite experience: bad abstractions generally cause more pain than duplicated code. Generally this is because bad abstractions tend to leak their bad-ness into the code around them.