AdvancedBase
, that's from hereAdvancedBase
existed.If you're copying and pasting code, you need to ask this question:
If your answer is the first, you should find more than one piece of code that's doing the same thing you want to do and see if any of them are doing it differently. One of the ways of doing this thing is going to be more recent and/or (yes, potentially "or") more correct. More correct approaches are ones which reduce coupling, move from legacy implementations to more recent ones, and are actually more convenient for you to use. Whenever ever any of these three things are in contention it's very important to communicate this to the appropriate maintainers and contributors.
If your answer is the second, you should find a way to DRY that code.
In my experience, the harder I think about the correct way to implement something, the bigger a mistake I'm going to make; unless a big part of the reason I'm thinking so hard is because I want to find a solution that reduces complexity and has the right maintanence trade-off. There's no easy solution for this so just keep it in mind; there are some things we might write 2 times, 3 times, even more times over before we really get it right and that's okay; sometimes part of doing useful work is doing the useless work that reveals what the useful work is.