Join us for free and read amazing contents on elCurator.

Get wind of our features.

Already registered? Sign in.

When Code Duplication is the Right Answer w/ Sandi Metz

1 min
Dec 08 2017

Main Argument

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.

Let's Discuss

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?

What are you waiting for? Get the best of the web.