“Broken gets fixed. Crappy stays forever.”
Someone said that once, referring to software development. It’s one of the best things I’ve ever heard. It very accurately describes most all development processes that don’t involve spending 90% of the time on polishing existing features. Thing is, if there’s a bug in the software that impacts users then that’ll quickly get fixed. Because hey, gotta keep the users happy. But if an underlying mechanism is implemented sloppily, yet it still works, then it’ll likely stay that way forever.
Nobody will want to touch fragile code. “It just works” is often more than enough reason to not clean things up behind the scenes. After all, the end user doesn’t get to see the code. It’s not as important as implementing a much-requested feature or that one prominent bug a lot of users are suffering from.
This is why I believe it is important to always code like what you write is going straight into production. It saves you the hassle of going back and rewriting everything to be neater, if you even would’ve taken that time to begin with. It also prevents a “prototype in production” situation, where prototype code goes untouched for long amounts of time and eventually just gets kicked into the final product.
But then what about rapid prototyping? Learn to write good code faster, I suppose?