Clean Code

Vasu Vanka
1 min readFeb 23, 2021

In this article am going explain about how to maintain code as clean as possible.

  1. Define variable,class and function names simple,readable.
  2. Make sure context in mind while defining names.
  3. Never write code comments. By looking at code one can understand what it will do.
  4. Divide code into smaller and reusable blocks.
  5. Limit number of lines per file for easy modification and debugging.
  6. Keep TODO when something should be done in future.
  7. Add Licence and Author information to each and every file.
  8. Remove unused and commented code all the time.
  9. Unit test code with all possible cases.Unit tests help to write less error prune code.

10. Follow defined architecture pattern.

11. Understand Separation of concern at each level.

12. Make code as modular as possible for easy replacement and integration.

13.Follow best practices defined by language experts.

Follow me & give thumbs up for more interesting posts.

Thank you.

--

--