The trick really boils down to: be messy, but clean up. If you don't do the second half of each thing (copy and paste / don't copy and paste), then you end up with that unmaintainable mess. If you do the second part too early, you end up with the wrong abstraction.

Sandi Metz also talks about this: http://www.sandimetz.com/blog/2016/1/20/the-wrong-abstractio...

Someone should invent "immutable programming". A paradigm where you can't delete code.

It's a bit the opposite of Vigil, a programming language who punishes functions throwing errors.

https://github.com/munificent/vigil