English: A vs. An
Future TechnologyCurated News 2026-09-19 9 min read

English: A vs. An

Master the fundamental A vs. An grammar rules with this clear guide. Learn when to use each indefinite article correctly in software docs and everyday writing.

Researched and edited by Kiran Ch and the WhatIsFuture editorial team. Reviewed for factual accuracy before publication.

When I first saw this headline pop up on Hacker News, my immediate reaction was simple: why are developers debating elementary school English grammar again? The post, published on Red Blob Games under the title “English: A vs. An,” ignited a remarkably deep discussion in the tech community. But as I read through the comments and reflected on my own years of building software and analyzing technological shifts at WhatIsFuture.com, I realized something important. What looks like a tiny linguistic quirk is actually a classic software engineering disaster in miniature.

It is the quintessential example of how human language consistently resists algorithmic order. As developers, we love deterministic systems. We want clear rules, boolean conditions, and predictable outputs. Yet, the moment you try to program something as trivial as picking between "a" and "an" before a dynamically generated noun, you are dragged kicking and screaming into the messiness of phonetics, historical linguistics, regional dialects, and context-dependent pronunciation. In my view, this simple debate opens up a fascinating window into how we build interfaces, how natural language processing operates, and why edge cases in software are often where the real battle for quality is fought.

Private Community

Join Our Tech Community

Get instant alerts on the most critical AI breakthroughs on our WhatsApp channel. No spam, just signal.

Join Channel Free →

The Deceptive Simplicity of a Grade-School Rule

If you ask a ten-year-old student how to choose between "a" and "an," they will likely recite the standard rule taught in primary school: use "a" before consonants and "an" before vowels. If the word starts with A, E, I, O, or U, you throw an "n" on the end of your indefinite article. It sounds clean, elegant, and perfectly suited for an if/else statement.

In code, a naive developer might write a quick helper function that looks something like this in mental pseudo-code:

function getArticle(word) { return "aeiou".includes(word[0].toLowerCase()) ? "an" : "a"; }

If you ship that function to production, your software will immediately start outputting nonsensical English. You will tell your users that they have logged in for "a hour," that they are interacting with "an user," or that they are reading "an European framework." The system breaks down instantly because human language does not care about written orthography; it cares about spoken phonetics.

The actual rule, as any linguist or observant coder quickly realizes, depends entirely on the sound that follows the article, not the character code of the first letter. "Hour" begins with a silent 'H', leading into a vowel sound (/aʊər/), requiring "an." Conversely, "user" begins with the letter 'U', but phonetically starts with a consonant glide sound (/juːzər/), requiring "a." When I began analyzing how dynamic text generation handles this across modern web applications, I realized that bridging the gap between orthography and phonetics without dragging in a massive machine learning model is one of the most entertaining challenges in UI micro-engineering.

Why Developers Care So Much: Games and Dynamic UI

You might wonder why Amit Patel over at Red Blob Games—a site legendary for its brilliant visual explanations of pathfinding, map generation, and computational geometry—was writing about English grammar in the first place. The answer lies in procedural generation and dynamic text styling.

When you build a game, particularly an RPG or a roguelike, the world is created programmatically. Inventory systems are constantly constructing strings like:

  • "You picked up a wooden shield."
  • "You picked up an iron helm."
  • "You picked up a unique gem."
  • "You picked up an ancient scroll."

In early text adventures or unpolished indie titles, developers frequently lazy-hack this problem by writing "You picked up a(n) iron helm." Every time I see "a(n)" in a game or a modern SaaS dashboard, a small part of my user experience soul dies. It is a subtle declaration that the engineering team gave up on polishing the presentation. It breaks the illusion of a polished, handcrafted universe.

When software generates text dynamically—whether it is a notifications engine in a web app, an automated reporting tool, or a game—getting these small details right creates a subtle, subconscious feeling of quality. As I often advocate when discussing digital experiences, execution lives in the details. When software speaks to us smoothly and correctly, we trust it more. When it stumbles over a basic article, it feels robotic and unrefined.

The Acronym and Initialism Nightmare

If handling standard dictionary words like "hour" or "unicorn" were the only hurdle, developers could probably build a tiny static lookup list and call it a day. But technical software is saturated with acronyms, initialisms, and jargon. This is where the simple rule turns into an absolute engineering nightmare.

Consider how developers pronounce terms in our industry:

  • SQL: Do you say "an S-Q-L server" (starting with the vowel sound 'es') or "a Sequel server"? Both are widely used, meaning the choice between "a" and "an" depends on the developer's dialect or internal monologues.
  • URL: Is it "a U-R-L" (starts with 'you') or "an U-R-L"? Almost everyone says "a U-R-L," but a simplistic regex checking for the leading vowel 'U' will misclassify it as requiring "an."
  • FAQ: Is it "a F-A-Q" (starts with 'ef') or "a facts list"?
  • HTML: "An H-T-M-L page" (starts with 'aitch', a vowel sound in most English dialects).
  • XML: "An X-M-L file" (starts with 'ex').

When I think about constructing natural language generation pipelines, initialisms highlight the tension between formal rules and practical usage. What happens when regional accents enter the picture? In American English, "herb" is pronounced with a silent 'H' ("an herb"), whereas in British English, the 'H' is pronounced ("a herb"). Similarly, historical usage leads to debates over phrases like "a historical event" versus "an historical event," where older styles soften the 'H' sound entirely.

How do you code for that? Do you pass the user's browser locale to an article selection library? Do you build accent-aware text generators? Suddenly, a problem that felt like a ten-line coding task demands localized phonetic dictionaries, state machines, or natural language processing engines.

Engineering Solutions: From Heuristics to Phonetic Dictionaries

In the tech discussions surrounding the Red Blob Games article, engineers showcased a wide range of pragmatic approaches to solve this issue. In my view, the solutions chosen reflect a company's or developer's engineering culture and technical priorities.

1. Simple Heuristic Libraries

For lightweight frontend web applications, full phonetic processing is overkill. Most developers turn to small JavaScript packages (such as indefinite or custom regex wrappers). These libraries work by combining standard vowel-checking rules with a hardcoded list of common prefixes and exceptions. They handle words like "user," "honest," "hour," and common single-letter abbreviations. It is lightweight and catches 98% of common use cases, though it inevitably fails on uncommon words or obscure technical jargon.

2. Phonetic Dictionaries (CMUdict)

When precision is mandatory, developers turn to tools like the Carnegie Mellon University Pronouncing Dictionary (CMUdict). CMUdict maps over 130,000 English words to their ARPABET phonetic transcriptions. Instead of inspecting character letters, the code looks up the word in the dictionary, checks the initial phoneme symbol, and checks whether that phoneme represents a vowel sound.

If the target word isn't in the dictionary, the program falls back on algorithmic guessers or grapheme-to-phoneme (G2P) models. This is vastly more robust, but it comes at the cost of a significantly larger memory footprint and added architectural complexity.

3. Large Language Models and Generative AI

Today, as generative AI becomes ubiquitous, we are shifting from deterministic conditional logic to probabilistic models. Modern Large Language Models (LLMs) rarely fail at selecting "a" versus "an" because they operate on token embeddings and contextual probability rather than hardcoded letter checks. An LLM predicts the next word based on vast datasets of human speech and writing, naturally capturing phonetic flow without explicit grammatical rules.

However, spinning up an LLM query or running a local neural net just to determine whether a user picked up "a" or "an" apple in a game is like using a sledgehammer to crack a walnut. It introduces latency, compute costs, and potential non-determinism into a problem that ought to be fast and local.

The Broader Lesson for the Future of Tech

Why did this discussion strike such a resonant chord across the tech industry? I think it touches on a deep, fundamental truth that every modern software founder, designer, and engineer eventually faces: human reality is fundamentally edge-case heavy.

We build abstract models to represent human behavior, language, time zones, geographical addresses, and names. We want reality to fit nicely into our database schemas and function signatures. But human life—and human language in particular—is an organic evolutionary product. It grew out of thousands of years of trade, conquest, phonetic simplification, slang, and cultural mixing. It was not designed by a standards committee, and it certainly wasn't written to run efficiently on silicon processing units.

At WhatIsFuture.com, I spend a lot of time analyzing how technology interacts with human culture. The "A vs. An" debate reminds us that as software becomes deeper integrated into human lives, software design must adapt to human messy realities, not force humans to flatten themselves for algorithmic convenience. When software developers take the time to solve micro-linguistic details like proper article selection, they are committing to human-centered design. They are choosing to make the software adapt to the user's natural language patterns, rather than forcing the user to tolerate broken, robotic artifacts like "a(n) item."

The next time you build an interface, code an automated email sequence, or script a dynamic game world, take a moment to look at how your system handles dynamic phrasing. Embracing the complexity of human language is not a waste of time; it is the hallmark of software craftsmanship.

Frequently Asked Questions

Why is choosing between "a" and "an" so difficult to code programmatically?

It is difficult because the choice depends on spoken phonetics (vowel sounds vs. consonant sounds) rather than written letters (vowel letters vs. consonant letters). Because English orthography is not strictly phonetic, words like "hour" start with a consonant letter but a vowel sound, while words like "user" start with a vowel letter but a consonant sound. Code must either use complex dictionary lookups, phonetic transcription models, or heuristics to accurately predict the sound.

How do software engines handle "a" vs. "an" for technical acronyms like SQL or XML?

Software handles acronyms by evaluating how the individual letters or full words are pronounced aloud. For example, "SQL" pronounced as "S-Q-L" begins with an "es" sound, requiring "an SQL server." If it is pronounced phonetically as "Sequel," it requires "a SQL server." Robust libraries maintain exception tables for common technical initialisms or analyze character-by-character phonetic outputs for isolated capital letter strings.

What is the most lightweight way to handle article selection in JavaScript?

The standard pragmatic approach is to use an established light npm package (such as indefinite) or a custom regex heuristic that handles standard vowels while specifically catching known exceptions (e.g., words starting with "eu-", "uni-", "onc-", "hon-", "hour-"). For basic consumer web application UIs, this achieves high accuracy without requiring heavy computational resources or full NLP datasets.

This analysis was inspired by a story originally reported by Hacker News. Read the original report →

Recommended Tool

Supercharge Your Workflow with Claude AI

The AI assistant used by professionals worldwide. Write, code, analyse — all in one place.

Try Claude Free →