When Code Duplication is the Right Answer w/ Sandi Metz
Niko 👩🏾💻 Aug 31, 2017
This talk blew my mind and I thought it would benefit the DEV community.
Sandi equates trying to fix a problem by increasing the complexity of the wrong abstraction, with chasing a beach ball on the outgoing tide. She urges us to prefer duplication over abstraction in our code. DRY isn’t bad and duplication isn’t good. But, if your choice is between duplication and the wrong abstraction, the right choice is duplication.
Sandi offers this quote, “Make the change easy, this might be hard, then make the easy change”, as guidance. She advises us not to get lost trying to get to the future with our code, but instead to aim for code that can adapt for the future when it arrives (with the idea of making small objects that have single responsibility at it’s core). What are your thoughts about this?