Names should be descriptive and specific enough to clearly communicate their purpose and avoid confusion. This includes using full words instead of abbreviations, being domain-specific when necessary, and ensuring names accurately reflect the function’s behavior or data’s purpose.
Key guidelines:
isRightToLeftLocale instead of isRtlLocalegetSentFolderCandidatesByRegex could be getImapSentFolderCandidatesByRegexFlatEntityMapsCacheService vs WorkspaceFlatMapCacheServicestepExecution.result instead of result.resultuseUpdateMultipleRecordsFromManyObjects instead of useUpdateManyRecordsFromManyObjectsExample:
// ❌ Ambiguous and abbreviated
const isRtlLocale = (locale: string) => { ... }
const mergeInProgressState = atom({ ... })
// ✅ Descriptive and specific
const isRightToLeftLocale = (locale: string) => { ... }
const isMergeInProgress = atom({ ... })
This helps with IDE autocompletion, reduces naming conflicts, and makes code more self-documenting for better maintainability.
Enter the URL of a public GitHub repository