DEV Community

Discussion on: Why Technical Debt is not Bad Debt

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

Nice article.

I would put more emphasis on why you shouldn't be afraid to be messy before you refactor.

In fact I wrote about it here

That shitty first draft

When I'm starting to work on a project or a feature, my initial code is messy.

It has thing that are hard-coded but shouldn't. It has top-level properties and functions all over the place. Sometimes implemented twice. Things that should be extracted but are not. Things that are extracted in a way that doesn't really make sense. Usually with a bad name.

That initial messy code serves important purposes. Playing with and learning a new API. Validating that it makes sense to invest time into an idea. More importantly, it's a remedy against perfectionism. On this, I am with writer Anne Lamott

Perfectionism is the voice of the oppressor, the enemy of the people. It will keep you cramped and insane your whole life, and it is the main obstacle between you and a shitty first draft.
Perfectionism is a mean, frozen form of idealism, while messes are the artist’s true friend. What people somehow (inadvertently, I’m sure) forgot to mention when we were children was that we need to make messes in order to find out who we are and why we are here — and, by extension, what we’re supposed to be writing.