1 link tagged with all of: readability + cognitive-psychology + domain-driven-design + naming + code-conventions
Links
This article explains how precise naming in code cuts down mental overhead and speeds up understanding for both humans and AI. It covers naming functions for call-site readability, using wishful thinking to craft natural-language-like code, leveraging domain types for clearer parameters, adjusting name length by scope, and ditching unhelpful prefixes and generic helpers.
- Clearer names can cut debugging time by nearly 20%, and AI tools benefit similarly from better identifiers
- "Wishful thinking" naming—writing calls as if ideal functions already exist—produces natural, sentence-like code (e.g. notify_all(registered_clients, about=the_new_version))
- Using domain-specific types instead of primitives (e.g. Language preferredRssFeedLanguage instead of int languageId) frees names to convey intent
- Dropping noisy conventions—prefixes like "I", get/set method names, and catch-all classes like Utils—leads to clearer, more precise code
naming
readability
cognitive-psychology
domain-driven-design
code-conventions