Clean Code

IDE Comment Keywords (WIP)

Angular Coding Style Guide

Comment keywords are special annotations in your code that various IDEs and tools can recognize. These keywords help developers flag areas needing attention, such as bugs, optimizations, or questions.

Common Keywords

KeywordDescription
TODOSomething to be done later.
NOTEGeneral comments about code decisions.
HACKA workaround or quick fix that should be improved later.
BUGKnown bugs that need to be addressed.
OPTIMIZESuggestions where code performance can be improved.
DEPRECATEDFeatures that are obsolete and should be avoided.
IMPORTANTHighlights critical aspects of the code that must be understood.
WARNINGIndicates potential issues that could cause problems.
REVIEWAreas of code that require additional scrutiny from a reviewer.
QUESTIONUncertainties or requests for clarification from other developers.
CLEANUPAreas where code can be made cleaner or more readable.
TEMPTemporary code that is expected to be replaced.
TESTCode that is used for testing purposes and not part of the final product.
UNDONEIncomplete implementations that need to be revisited.

Tooling Support

  • todo-comments.nvim: A plugin for Neovim that highlights and searches for TODO comments and other keywords in your project.
  • Codetag (PEP 0350): Python Enhancement Proposals specifying conventions for comments used to annotate code.
  • JetBrains IDEs: Documentation on how JetBrains products like IntelliJ IDEA handle TODOs and other code annotations.
  • FixmeComment: A discussion on the use of FIXME comments in code, highlighting practices and considerations.

Best Practices

  1. Be Specific: Always accompany a keyword with a clear and concise explanation of what needs to be done.
  2. Review Regularly: Periodically review comments to address important issues and ensure comments remain relevant.
  3. Prioritize: Use the urgency and importance of the comment to prioritize development tasks.
  4. Keep Updated: Update or remove comments as changes are made to ensure that they accurately reflect the state of your codebase.

Variable Naming Conventions (WIP)

Constants are all caps with words being separated by underscores.

On this page

Made with 💚 for Hackers by Hackers