Naming things is the whole job: How identifiers reveal architectural debt
Most codebases don't have a naming problem — they have an architectural thinking problem that leaks into their identifiers. The concrete rules that keep code self-documenting.
By Nzubechukwu Cyprian · Pharmacy student at UNN, full-stack developer

There is a classic adage attributed to Phil Karlton: "There are only two hard things in Computer Science: cache invalidation and naming things."
Early in my career, I assumed this was just a lighthearted developer quip. After architecting complex codebases with dozens of data pipelines and distributed services, I realized the sobering truth:
Bad names are rarely the illness — they are the fever.
When an engineer struggles to name a function, class, or database column, it is almost never a vocabulary deficit. It is a confession that the underlying abstraction is muddy, overloaded, or premature. When your brain refuses to give a clean name to a function, it is because that function is doing four different things and your subconscious refuses to lie with a concise label.
1. The "Helper", "Manager", and "Util" Confession
If you grep a legacy codebase for files named UserManager.ts, PaymentHelper.ts, or dataUtils.ts, you have found the code graveyard.
These suffixes are linguistic garbage bins:
- What does a
Manageractually do? Does it fetch? Does it validate? Does it execute database mutations? Does it format UI strings? - Usually, all of the above.
The moment you ban the words Manager, Handler, Processor, and Helper from your naming vocabulary, your architecture improves instantly because you are forced to isolate domain boundaries:
- Instead of
PaymentManager.ts→ split intoVerifyPaystackSignature.ts,RecordOrderLedger.ts, andDispatchReceiptEmail.ts. - Instead of
DataHelper.clean()→ useSanitizeCouponCode(raw: string): string.
2. Say What, Not How
A function name should describe the business outcome, not the computational mechanism:
loopThroughItemsAndFilterActive()is telling the reader about aforloop that might be refactored into a SQLWHEREclause tomorrow.getActiveSubscriptions()describes the domain requirement that remains invariant regardless of how it is calculated.
Similarly, boolean variables must read like true/false assertions:
userEditis ambiguous: Is it a function? A permission? An event?canEditUser,hasActiveSubscription,isVerified, andshouldSendNotificationimmediately clarify intent in anifstatement.
3. Real Code: Domain-Driven Event Naming
In event-driven architectures and webhooks (like Paystack or Stripe), sloppy event names cause catastrophic data corruption.
Consider this naming contrast:
// Ambiguous and dangerous
interface PaymentEvent {
status: "pending" | "done" | "error";
user: string;
}
// Precise, past-tense domain events
export type BillingEvent =
| { type: "order.checkout_initialized"; orderId: string; amountCents: number }
| { type: "payment.charge_succeeded"; transactionRef: string; paidAt: Date }
| { type: "payment.signature_verification_failed"; rawPayload: string }
| { type: "order.delivery_completed"; orderId: string; downloadToken: string };
With domain-explicit event types, the compiler acts as a mathematical proof assistant: it is impossible to process an event before knowing its exact historical state.
4. Why Naming Matters 10x More with AI Assistants
If you use AI coding tools (Claude, Cursor, Copilot), naming discipline is no longer just for human readers — it directly dictates token prediction quality.
When your files and interfaces have vague names like TempDataHolder or ProcessObject, the model hallucinates generic boilerplate.
When your types are named IdempotentWebhookPayload, VerifiedMerchantRecord, or SanitizedMarkdownContent, the model's probabilistic context window locks into your exact architectural intent. High-precision naming acts as an automated prompt engineering guardrail.
If naming a module feels difficult, step away from the keyboard. The friction is your design trying to warn you that your abstractions are incomplete.
One email when a post lands
No schedule, no spam. Just the posts worth reading — new writing on software, AI, products, and the Pharmacy × Tech life.
Prefer a feed reader? Grab the RSS feed.
Keep reading
Software engineeringYour README is your first interview
Before anyone judges your code, they judge your README. What a good one actually contains, from someone who reads a lot of them.
Software engineeringThe bug that taught me to read error messages properly
A three-line error sat in my logs for a week. It told me exactly what was wrong. I just never read past the first line.
Software engineeringCSS taught me more about engineering than I expected
Specificity, inheritance, and the cascade are systems thinking in disguise. Understanding CSS made my other code better.