Reviewer · Naming Conventions
Semantic, unambiguous naming
Choose names that clearly convey what an identifier represents and that distinguish it from similarly-named or similarly-purposed entities in the codebase. Before naming a type, variable, or function, check whether an existing term already carries a different meaning in that context (e.g., "migrate" already means something specific for persisted state, so...
Choose names that clearly convey what an identifier represents and that distinguish it from similarly-named or similarly-purposed entities in the codebase. Before naming a type, variable, or function, check whether an existing term already carries a different meaning in that context (e.g., “migrate” already means something specific for persisted state, so naming a panel-replacement callback migrateOut is confusing; getReplacementPanel is clearer) and whether two names in the same module are differentiated only by subtle or missing semantics (e.g., dataSource vs. filterableSource, or ControlSourceState vs. DataControlState, which left reviewers unable to tell them apart “making my brain implode”). When two closely related concepts turn out to be the same thing, collapse them into one name/type rather than keeping both around under confusing aliases. Also avoid naming things after transient process context instead of their actual behavior — e.g., a test describe block titled “round 2 review fixes” should instead describe what scenario it covers (such as “saving while the data stream changes”). When renaming identifiers, also remove any now-unused fields/parameters that no longer belong to the renamed concept. If a naming decision is shared across packages or plugins (e.g., reserved sentinel values), centralize it in a shared package rather than duplicating string literals, to prevent drift.