Prefer to change the code rather than write a workaround
catern.com
catern.com
People are taught that everything should be a magical black box, designed so well that after implementing it - you never need to change it, only add to it along the predefined extension points. So if that's true - even modifying the base classes in your own system feels "wrong", never mind the "other people's code".
Another thing that has been plaguing our industry is tons of if statements to cover edge cases instead of thinking about the ways you can avoid them by writing proper logic and general equations.