DEV Community

FTWCougar
FTWCougar

Posted on

The importance of Clean Code

Clean Code

"So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read." - Robert C Martin

Clean code is very important not just to you but everyone that has to work with the code as-well. Clean coding means writing for your future self and others that will have to go back and read your code. The code is not just for the computer it is for humans to understand too.

If you do not write clean code you will get lost in the sauce as my cohort would say. Code should be written in functions adding modularity and those functions should do one thing. Nested code can be hard to read and make changes to if the programmer can't even understand the code. Writing with variables and functions that have meaningful names can be helpful towards writing clean code. Writing simple code will help with writing clean code for example knowing when to use if statements and when to use ternary statements. Having all these things will lead to clean code as-well as when looking for how to fix a problem it will be solved faster with clean code.

To conclude writing clean code isn't just for yourself but for others too. Just because you understand it now doesn't mean you will later. Writing clean code will allow you to work much faster as-well as anyone you are working with too.

Top comments (0)