DEV Community

Cover image for Clean Your Code
Alestor Aldous
Alestor Aldous

Posted on

Clean Your Code

title

So What Is It About

Just chill and read

So i was fixing some messy code as i dig deeper i noticed a set of code that could have been easily made better had the developer put a little effort into fixing it during the inception instead of leaving it “Latter ... ”. Legacy code is mostly the result of developers not trying to “stay clean” . Small things that may seem little while you are doing them, could easily pile up and haunt you or the next developer at later time.you should have the habbit to keep it clean while you are coding.

If you dont follow the rules you'll end like this :

(from yoyo code) :

yoyocode

What about cleaning up the messy code that you wrote while waiting for the PR approval ?

Ans : Bad code is going to attract more bad code and force you to refactor it “later..”. Do it yourself teach yourself the habit of clean coding instead of leaving it for “refactoring later”.

Fell free to discuss about you refactoring methods

Conclusion

Keep Coding !!!

🙏 Share with your friends on Twitter

Top comments (2)

Collapse
 
gsandec profile image
Gustavo Silva

We (Codacy) also try to avoid technical debt as much as we can. We hate technical debt so much we have made product to fix it!

We have also written an article to make the most out of pull requests review. Your readers can read that here - Hot to code review in a pull request. We hope it adds value to you and your followers :)

Collapse
 
alestor_123 profile image
Alestor Aldous

Thanks for sharing your knowledge!!