Naming/Names
- Name for the purpose, not implementation.
- Example:
activeTeamMembersinstead offilteredUsers.
- Example:
- Stay consistent.
- Context is important.
- While in context of a class we can use shorter names, example
Note.idis clear that its the id of the note. No need for redundantNote.nodeIdnaming. Outside of this context make sure its namednamedIdand better yet has strong typing for the type of values it holds using techniques like Branded Types in TypeScript, Value Classes in Kotlin
- While in context of a class we can use shorter names, example
- Variable names to be VALID for Entire Duration of Function
Children