-
Notifications
You must be signed in to change notification settings - Fork 0
Coding Standards
Navheen edited this page Jul 27, 2025
·
2 revisions
- Follow the project's established style guide.
- Write clean, modular, and well-structured code.
- Keep functions and classes small and focused on a single responsibility.
- Avoid hardcoded values as much as possible; use constants and configuration files instead.
- Maintain consistency in naming conventions and code structure.
- Use camelCase for variables and function names (
fetchHaiku). - Use PascalCase for class and component names (
Home). - Use meaningful and descriptive names that reflect the purpose of the variable or function.
- Use proper indentation (e.g., 2 spaces for JavaScript, 4 spaces for Python).
- Use blank lines to separate logical sections of code.
- Group related functions and classes into appropriate modules.
- Keep related files together and follow a logical folder structure.
- Provide meaningful error messages and log errors where appropriate.
- Avoid silent failures and try to always return useful feedback.
- Ensure that relevant files are included in the .gitignore.
- Include comments explaining complex logic.
- Maintain up-to-date README and wiki documentation.
- Use inline comments where necessary.