Code review principles for the back-end team at Acme Corporation
When code reviewing, link the principle to the problem you see in the code. Instead of writing long comments and explaining why a particular design decision isn't the right choice, link to principles that provide relevant information for discussion.
- Code an off-switch
Always plan for a way to switch your work off
- Documentation should be close to the code
Documentation, in all forms, should be as close as it can be to the code.
- One single source of truth
Data should be held in one location, duplicates of that data should be by reference only.
- Software should be easy to debug
When software behaves unexpectedly, it should be easy to understand what is causing the problem.
- Logic should be in the positive
Logic should in general be asking the question "Is this true?" instead of "Is this not true?"
- Use consistent coding conventions, automatically enforced
Code should be formatted the same way and enforced automatically using tools.
- Avoid double negative logic
Conditional logic should avoid double negatives.