News for hackers. Stuff that matters.
Re:Don't DRY Your Code Prematurely by jononor on Thursday May 30, 2024 @05:55PM (#40529155)
Why wasn't the original implementation swapped for the new one? The unwillingness/inability to do that seems to be most likely the core of the issues here?
Re:Don't DRY Your Code Prematurely by bcrosby95 on Thursday May 30, 2024 @06:07PM (#40529256)
The majority of our business was through the 1st implementation. Because of that it was the base we used to refactor into a more abstract solution for further scenarios. It was never deemed "worth it" to transition the 2nd non-DRY version. Why refactor an existing implementation if its working well enough and we could expand to new markets instead?
Re:Don't DRY Your Code Prematurely by jononor on Friday May 31, 2024 @03:33AM (#40532378)
Yes, why do it? :p I mean, there are pros and cons - costs and benefits. And I can see both scenarios where it is better to spend the time on something else (that has better chance of bringing in money), and cases where it would be the right thing to do the cleanup (maybe original is just about to fall apart, or the new has straight up benefits to the business, or the act of doing it will greatly improve testing/QA in a critical area, etc).

Writing it DRY in the first place would also have costs, including the alternative costs. Would it have been better to take those there and then?