Start using this Workflow
Coding Standards Checklist
Naming Conventions
Use clear and descriptive names for variables, functions, and classes.
Avoid using single-character names except for short-lived local variables.
Follow the project's naming conventions consistently, whether it's camelCase, snake_case, or PascalCase.
Code Formatting
Indent code consistently, using spaces or tabs as defined by the project's style guide.
Limit line lengths to a reasonable number of characters for better readability, such as 80 or 120.
Use whitespace strategically to separate logical code blocks within functions.
Commenting and Documentation
Write comments that explain the why, not the what, and keep them up-to-date.
Provide documentation for all public APIs, classes, and methods.
Use inline comments sparingly and only when necessary to clarify complex code.
Code Structure
Follow the Single Responsibility Principle: each function or class should have only one reason to change.
Prefer composition over inheritance where applicable.
Organize code logically and group related functions and classes together.
Error Handling
Use exceptions for error handling rather than return codes or error flags.
Catch exceptions at the highest level that can properly handle them, not at the point of throw.
Provide meaningful error messages that can aid in debugging.
Version Control
Commit early and often, with clear and concise commit messages.
Never commit broken or untested code to the main branch.
Use branches and pull requests to manage feature development and code reviews.