Nzubechukwu.
← All posts
Software engineering7 min read

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

Cover image for “Naming things is the whole job: How identifiers reveal architectural debt” — Software engineering

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 Manager actually 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 into VerifyPaystackSignature.ts, RecordOrderLedger.ts, and DispatchReceiptEmail.ts.
  • Instead of DataHelper.clean() → use SanitizeCouponCode(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 a for loop that might be refactored into a SQL WHERE clause tomorrow.
  • getActiveSubscriptions() describes the domain requirement that remains invariant regardless of how it is calculated.

Similarly, boolean variables must read like true/false assertions:

  • userEdit is ambiguous: Is it a function? A permission? An event?
  • canEditUser, hasActiveSubscription, isVerified, and shouldSendNotification immediately clarify intent in an if statement.

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.

Found this useful? Send it to someone.

Nzubechukwu Cyprian studies Pharmacy at the University of Nigeria, Nsukka and builds software, products, and AI experiments in between.

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.