To consolidate in one place, the leading best practices for software development.
To make each individual best-practice easily sharable.
Pull requests welcome from all. There are plenty of entries below waiting to be written up. More details can be found here.
Coding Best Practices
- Prefer Composition over Inheritance
- Always use descriptive names
- Avoid Nulls
- Avoid nested code
- Prefer immutability
- Prefer code reuse
- Avoid negatives and double-negatives
- Prefer readable code
- Never use magic values
- Prefer short methods
- Always delete dead code
Design Best Practices
- Prefer alerting over silently hiding bugs
- Avoid premature optimizations
- Prefer validating assumptions
- Avoid big-bang switchovers
- Prefer restricting visibility