ongoing list that is sure to change.
setting: you can't show someone the light if they don't open their eyes. know when to shutup.
- single responsibility
- well written code should make tests easy to write
- explicit is better than implicit, except when its not
- YAGNI (You Aren't Gonna Need It)
- DO NOT PREMATURELY OPTIMIZE,
- do not solve future problems that don't exist now
- do as little as possible
- KISS (Keep It Simple)
- DRY (Don't Repeat Yourself)
- Incremental Development - this simplifies verification, easier cognitive load
- Loose Coupling - two or more components are coupled with what they know about each other. the less they know about each other, the better - loosely coupled
- High Cohesion - that degree the grouped elements belong together, the higher the cohesion of the group, the easier to understand structure
side notes:
- avoid mutation
- favor pure functions - given same input, always returns same output. no side effects like ref/return non-local variables, mutations, io streams
- Principles of Software Engineering
- DIP in the Wild
- Anti Pattern List
- Unnecessary Variables
-
Using a variable with the intention of making the code more readable comes very often as an afterthought. And an afterthought is hardly ever synonymous with carefully thought-out design.
-
- Clean Code Cheat Sheet