DEV Community

Discussion on: Clean code, dirty code, human code

Collapse
 
somedood profile image
Basti Ortiz

I hate how it's so simple, yet I still find myself in that "rabbit hole". 🤦‍♂️

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

Yeah, I feel ya. And I know exactly how debilitating it can be when you spend hours searching for a "clean" solution to a problem, when you know you're capable of coding up a "dirty" approach in less time.

Thread Thread
 
somedood profile image
Basti Ortiz

More often than I'd like, I'm too pedantic for my own good. It ruins my productivity. I should really work on that.

It puts into perspective why people "iterate" on some code. Initial implementation is expected to be dirty, but that's okay because "iteration" is a thing.

Perhaps that's where my pernicious obsession with "clean code" comes from: I would believe that "iteration" takes up more time than if I had just done it properly the first time. In reality, of course, I end up spending much more time than needed.

Thread Thread
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

I can't quite recall what exactly, if anything, got me into that mindset to begin with, but it happened. Ngl, I'm still kinda dealing with it. There's nothing fundamentally wrong with writing clean code, but I think it's definitely a distraction and should only be a secondary concern, once you have something that at least works. Most of the time, people jump the gun and head straight for the Clean Code promised land.