DEV Community

Cover image for 10 good practices for CODING
leslysandra for Code Inspector

Posted on

10 good practices for CODING

No matter if you are a beginner at coding or an experimented developer, it is always good to remember the Good Practices for Coding! πŸ‘©πŸ½β€πŸ’»

Just remember that time when you had to go back to some piece of your very own code and didn't remember exactly... what that "variable" was for! or when you don't get, now, why you wrote so many functions related to the same operations!

Check out 10 "good practices" for coding, here:

  1. Learn multiple paradigm. Object oriented, imperative, etc. It takes time to assimilate all the concepts.

  2. Practice, practice, practice. Write code. Do small projects. Practice code like you would practice martial arts. Do some side projects just for fun and learn.

  3. Write good comments # yes! very clear but not many
    Code should be self explainable

  4. Write documentation ✍🏽 Yes! very important! to document what you are doing

  5. Write readable code πŸ€“ remember, it should be easy to understand at first read πŸ’»

  6. API design & writing ⏭️ keep it simple!

  7. Refactor whenever you have the chance 🀭 and when it is needed, keep it clean and simple!

  8. Remember πŸ‘·πŸ½β€β™€οΈ engineering your code the right way! Check out, design patterns, take into account software architecture for your all system.

  9. Naming convention! check out with your team, some "convention" to name your variables, constants and functions, and even files' names

  10. Code review! check other's code, let your team check your code! Learn new ways to solve the problem/challenge you are facing!

Also... are you planning to automate your code review check out here => https://www.code-inspector.com/automated-code-reviews

Discussion (0)