The trick really boils down to: be messy, but clean up.
If you don&#x27;t do the second half of each thing (copy and paste &#x2F; don&#x27;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.<p>Sandi Metz also talks about this:
<a href="http:&#x2F;&#x2F;www.sandimetz.com&#x2F;blog&#x2F;2016&#x2F;1&#x2F;20&#x2F;the-wrong-abstraction" rel="nofollow">http:&#x2F;&#x2F;www.sandimetz.com&#x2F;blog&#x2F;2016&#x2F;1&#x2F;20&#x2F;the-wrong-abstractio...</a>