Code Quality and Standards
High-quality code and consistent standards provide numerous benefits to software development overall improving the readability of the code and making it easier to maintain and understand.
Coding Standards/Best Practice
It isn’t possible to provide a single set of pre-defined standards which would be applicable to all due to the variety of technologies in existence. However each company is required to:
- Adopt a coding standard and ensure it is documented. Standards will vary based on your industry and technology stack. Instead of creating new standards, use existing industry-standard ones when possible. Consider adoption of CERT standards. Useful reference
Coding Standards and Best Practices to Follow | BrowserStack
- Coding standards should be introduced to developers during their onboarding and induction process.
- Where possible enforce these standards through:
- regular (human) code reviews
- automatically during code check-ins using static analysis tools like SonarQube - rejecting code that doesn’t meet the standard.
- Standards should be consistently applied across all projects & products (this is easier if using a tool)
Documentation
Comprehensive documentation must be created for all code and systems, this ties in with the requirements in
Playbook - Software Company - Technical ExcellenceDocuments must include:
- Diagrams of the system components
- Instructions on how to build and compile the code, including how to setup a developer machine to do this.
- Instructions on how the code is deployed and configured into a test and production environment
- Documentation on what infrastructure is needed to support the application
- Documents covering any overly complex or intellectual property (IP) parts of the code/system.
Testing
- Automated testing with high coverage requirements