3 ms·
> When I asked him about this, he said, "I have this philosophy that says if you only have two similar things, it's best to write separate code for each. Once y
by noisy_boy 2y ago
> When I asked him about this, he said, "I have this philosophy that says if you only have two similar things, it's best to write separate code for each. Once you get to a third, then you can think about refactoring and making some common code."
There is also the angle of when eventually the third usecase comes out, how much willingness/buy-in is going to be there to make changes to the running code for the refactoring?
Quite often than not, nobody wants to take the risk for the sake of introducing DRYness and you end up with three copies.