I once worked with a company that told me if just two lines of code are
repeated, then there’s probably a better abstraction that I should be using instead. A bit extreme, I know, but I took that to heart. I haven’t looked back and that advice has served me well.
Ash Furrow talks about the benefits of abstraction and how it can aid in ramp up. A good, short read