#clean-code #code #engineering
idea
CUPID are a set of properties or characteristics of code that make code joyful to work with.
- Composable: works well with others. It's easy to use and use again, easy to lean, not tricky, doesn't require lots of dependencies.
- Unix-philosophy: does one thing well (slightly opposed to SRP in that it's an external property of "having a single purpose" rather than being specifically tied to code)
- Predictable: does what you expect. No surprises, observable, deterministic.
- Idiomatic: feels natural. Software written to be understood by someone else. Conform to the idioms of the language. Where there are non, formulate an opinion as a team, document, and conform to it.
- Domain-based: solution domain models the problem domain in language and structure. Code should convey what it's doing in the language of the problem domain. Prefer a domain-based structure.