Vault7: CIA Hacking Tools Revealed
Navigation: » Latest version
Owner: User #524297
Maslow's Hierarchy of Code Review
Thought this was an interesting blog post, copied it here to provoke discussion. Based on Maslow's Hierarchy of Needs, which if you're not familiar with, you should probably look up first.
Code should be:
Correct:
- Does the code do what it’s supposed to?
- Does it handle edge cases?
- Is it adequately tested to make sure that it stays correct even when other engineers modify it?
- Is it performant enough for this use case?
Secure:
- Does the code have vulnerabilities?
- Is the data stored safely?
- Is personal identification information (PII) handled correctly?
- Could the code be used to induce a DOS?
- Is input validation comprehensive enough?
Readable:
- Is the code easy to read and comprehend?
- Does it make clear what the business requirements are (code is written to be read by a human, not by a computer)?
- Are tests concise enough?
- Are variables, functions and classes named appropriately?
- Do the domain models cleanly map the real world to reduce cognitive load?
- Does it use consistent coding convention?
Elegant:
- Does the code leverage well-known patterns?
- Does it achieve what it needs to do without sacrificing simplicity and conciseness?
- Would you be excited to work in this code?
- Would you be proud of this code?
Altruist:
- Does the code leave the codebase better than what it was?
- Does it inspire other engineers to improve their code as well?
- Is it cleaning up unused code, improving documentation, introducing better patterns?
- Is it taking on huge refactors, making everybody’s life easier?