This topic has been hit pretty hard lately, but for such a good reason. Love the take on it here and also the sculpture reference…beautiful.
I feel like I learned this lesson the hard way, but at least that made it deeply ingrained. For me the advice comes down to, “don’t be afraid to rewrite.” I think most of us developers feel a rising tide of fear when we think about starting a module or other segment of code from scratch...again. The truth is, the best optimizations, improvements, and system designs come from revisiting a problem from a more educated position.