DEV Community

Discussion on: How to write a clean code.

bitschupser profile image
Alex Rampp

I fully agree, if code would just be for executing on the machine, it would be absolutely sufficient writing assembly language. The reason why we have all these high-level languages and frameworks these days, is to make it easier implementing complex systems. If we sabotage this by writing messy code, we loose a big advantages of these technologies.

Thx for sharing the thought "other developers will mock you" - to be honest, I wasn't fully aware of this until you pointed it out. But that's the case. When implementing a feature, I try to write the code like a store - it's not just a bunch of instructions for a machine, it's a story on how this business case is meant to be. The audience of this story is either my future self or another developer who has to modify something in this story a few years from now.

pentacular profile image
pentacular • Edited

The other reason is that there is no "the machine".

There are many machines that the code should be able to target.

ishanbagchi profile image
Ishan Bagchi Author

Everything is art. Even coding is an art in itself. Clean and attractive codes are just so satisfying to see and understand.