While coding, spend some time in writing clean code and writing comments right away!

Andrew Lloyd Beaver PA
1 min readJul 5, 2021

This small habit will increase your credibility and also will save a lot of time in the future when you reread it.

You want to write comments in a way that is short, concise, easy to understand, using fewest words as possible. Don’t write an essay but convey a lot of info in the shortest way possible. Describe the “why” of the code. It should be clear what the code does.

Just be careful — you can end up spending hours customizing your documentation theme

Andrew Lloyd Beaver PA has spent a long time debugging code and agrees with this so much. Properly commented code is like the holy grail.

Comments rules:

Always explain your code in notes
Don’t overdo the comments
Don’t use closing comments
Always remove bad code
Always clarification of code
Use Legal, TODO and Informative comments

“Don’t comment bad code — rewrite it.” — Brian W. Kernighan and P. J. Plaugher

--

--