Writing clear and helpful comments is essential in collaborative projects to keep everyone in sync. Use consistent commenting standards, explain the 'why' rather than the 'what', and annotate decisions, hacks, and tradeoffs. Avoid commenting on obvious things, incorrect comments, outdated comments, incorrectly placed comments, and personal or informal comments. Utilize tools and styles like Better Comments, GitHub Copilot, ESLint, Codeium, and JSDoc to enhance your commenting process.
Table of contents
The Do’s of Commenting CodeThe Don’ts of Commenting CodeCommenting Tools, Styles, and AutomationConclusion3 Comments
Sort: