The ONS RAP standards at a glance
Use open-source languages for coding
Minimise repetition
- Use control flow
- Use functions
- Make complex code modular
Make your code readable and self-documenting
- Use a standard code style
- Everything that has a name in your code should have a name that is easy to understand
- It should be easy to understand which packages you use and where functions come from
Document everything that is needed to write and run the code
- Create README files for every project
- Embed design documentation with code
- Document dependencies
- Record manual quality assurance and tests
Document what the code is doing
- Code comments should explain the “why”, not the “how”
- Document functions and classes
Code modules should run end-to-end without manual intervention
- minimise manual steps
- Use configuration files
Use git for version control
Make sure your code meets quality standards
- Make sure your analysis meets quality standards
- Review all code as you go
- Test your code
Maintain and improve re-usable code continuously
- Make code improvements before errors occur
- Develop your code iteratively
Don’t reinvent the wheel
Set out clear aims and scope for each project
Set out your quality specifications
If appropriate, plan to open source your code in the future
Set out clear, well defined roles and responsibilities
Make a succession plan