(no title)
iovrthoughtthis | 2 years ago
Areas:
- Readability - how understandable the code is
- Maintainability - how the code enables the project to evolve
- Risk - security, regulatory and other vulnerabilities
- Correctness - whether the code does what you intended
- Robustness - how well the code handles unintended circumstances
- Performance - how resource efficient the code is
All of the above areas need to be considered within the context of the project and individual team members.## Readability
Code is readable if it meets your expectations and surprises you only when there's something you don't yet know about the technology. We expect code to look like the code around it. To follow most, if not all of the technologies idioms. To use clear and informative names. To explain why deviance exists. To be as abstract as the concepts being abstracted are crystallised.
## Maintainability
Maintainability is the code's relationship with the wider team and time. You should be able to learn all you need to know to change, test and deploy code. You should be confident that any changes you make will not cause unintended changes elsewhere in the code. To make a change, you should have to touch as little code as the concepts being changed are crystallised. You should be able to debug an issue as easily as, the system the issue is in, is old. You should be able to track down and alter the changes that introduce a bug quickly. You should be able to learn why a change exists.
## Risk
Code is low risk if it accounts for, and where possible, mitigates the various risks to a project.
## Correctness
Correct code does as you expect and surprises you only when there something about the system you didn't yet understand. Validating correct code is as automated as the validations are frequent. Correct code is only as complicated as the concepts it models. Correct code is only as abstract as the concepts it models are crystallised.
## Robustness
Robust code handles unexpected circumstances safely, quickly and predictably. Validating robust code is as automated as the validations are frequent and as comprehensive as the failures are risky.
## Performance
Performant code is as resource efficient as the resources are expensive, but also as efficient as the development costs are cheap.
epgui|2 years ago