3 ms·
I think in general if there is duplication and an abstraction can be made it should be done. The (in)famous article about 'duplication is cheaper than the wrong
by cjfd 5y ago
I think in general if there is duplication and an abstraction can be made it should be done. The (in)famous article about 'duplication is cheaper than the wrong abstraction' that is also mentioned below is seriously one of the articles about programming that I hate the most of all articles about programming. It goes very awry when it says 'Programmer B feels honor-bound to retain the existing abstraction'. As programmers we should expect the continuously refactor our abstractions and be very eager to do that. Of course, such a thing is only realistic with automated tests. Reluctance to change things is how things stagnate and go bad. Even if you create an abstraction that is wrong and that is undone later you have learned something. Just adding to the code base while not even attempting to improve anything does not teach one much and is the road to stagnation in poor code quality, aka the famous unmaintainable mess.