Skip to content
DevMeme
1875 of 7435
YAML's Norway Problem: A Cautionary Tale
Configuration Post #2085, on Sep 24, 2020 in TG

YAML's Norway Problem: A Cautionary Tale

Why is this Configuration meme funny?

Level 1: A Big Misunderstanding

Imagine you wrote a note for your friend to help plan a party, and you list the countries of all the friends you want to invite. For your friend from Norway, you just write “NO” as a quick abbreviation for Norway. But the person reading the note thinks "NO" isn’t a country at all – they think it means you said “no, don’t invite this country.” So they accidentally leave out all your friends from Norway. Oops! It was a big mix-up: you meant one thing, but it got understood as something else. In the same way, a computer saw the text "NO" in a settings file and misunderstood it as a command to turn something off. The funny (and a bit sad) result? The computer stopped serving an entire country (Norway) because it misread "NO" as “no access.” This meme is joking about how a tiny misunderstanding in instructions caused a really big oops in real life.

Level 2: Format Fiasco

JSON and YAML are two popular formats for writing configuration files – those files that let you tweak settings without changing code. If you’re new to them, think of JSON as the strict one that always wears a suit, and YAML as the casual one who sometimes bends the rules. In JSON (JavaScript Object Notation), you must use quotes for strings and follow a very precise syntax (commas, braces, and brackets in all the right places). JSON is like writing data in a very clear, explicit way. If you want the word "NO" to mean the letters N-O, you put it in quotes and JSON will always treat it as the text "NO". On the other hand, YAML (YAML Ain’t Markup Language) is designed to be more human-readable. It uses indentation and has a looser syntax – you don’t always need quotes around strings in YAML. But YAML tries to be smart about data types: it might automatically turn certain unquoted words into numbers, booleans, or other types because it assumes you meant that. This is called implicit type conversion (or coercion). It’s usually convenient – for example, writing age: 25 (without quotes) in YAML will give you a number 25, not the text "25".

The fiasco here happened because YAML has a list of magic words for booleans: if it sees “yes”, “no”, “on”, “off” (and a few others) unquoted, it assumes you mean true/false values. In our story, someone wrote NO in a YAML config file intending it to be the country code for Norway. But YAML saw that and thought, “NO? Got it, that’s a False.” The computer literally interpreted Norway’s country abbreviation as a boolean false value. So a setting that was supposed to include Norway instead effectively excluded Norway by turning it off.

This is an example of an edge case – a situation that is uncommon and probably wasn’t considered when the system was designed or tested. When the system was running in production (the live environment for real users), this little oversight led to a bug where Norwegian users got treated as if they weren’t allowed or the feature was disabled for them. Imagine the confusion: all other countries work fine, but Norway is getting a “service unavailable” because of a config entry! The developers likely had to do some serious debugging to figure out why Norway was special. It probably involved combing through configuration files, checking logs, and eventually having an “aha!” moment when they noticed the unquoted NO.

For a junior developer or anyone new to config files, the takeaway is: be careful with your data formats. Each format (JSON, YAML, XML, etc.) has its own rules and pitfalls. JSON vs YAML is a common debate – JSON is less likely to surprise you with hidden behavior because it’s stricter (what you write is exactly what you get), whereas YAML can be nicer to write by hand but has these gotchas where it guesses types. Neither is “better” universally; it depends on what you need. But if you choose a format like YAML, you have to learn its little quirks. In practice, teams establish guidelines: for example, always quote strings like "NO" or "Yes" in YAML to avoid this boolean trap. Some might even prefer sticking to JSON for critical configs to avoid subtle bugs. Also, good configuration management means testing those configs or using linters to catch weird cases. After all, a configuration file is basically code that can change how your system runs – and as this meme shows, even a tiny two-letter config mistake can cause a big problem!

Level 3: No Service for 'NO'

"I once disabled our product for the entire country of Norway for a day because NO in YAML evaluates to false 😔"
Aaron Abramov on Twitter

In the twisted annals of configuration mistakes, this one’s a doozy. A configuration file meant to include Norway ("NO") instead ended up telling the system “No, disable Norway”. The tweet above is a battle-scarred engineer’s confession: a tiny two-letter string brought down service for an entire nation. How? Welcome to the wonderful world of YAML parsing quirks, where "NO" magically turns into a boolean false.

Seasoned developers have a saying: everything works fine until it hits production — and then even your DataFormats can bite you. Here, a simple YAML config was the culprit. Unlike JSON, which is strict and unambiguous (strings stay strings unless you explicitly use true/false or numbers), YAML is more flexible... and a bit too clever. YAML will happily coerce certain words into booleans. It sees NO and thinks, “oh, that must mean No/False” (because in YAML’s mind, YES, NO, ON, OFF are special keywords for booleans). This implicit boolean coercion is part of YAML’s syntax legacy, intended as a convenience, but here it became a trap. The configuration likely had an entry for country codes, maybe something like:

# Allowed countries for the service:
countries:
  - US   # United States
  - SE   # Sweden
  - NO   # Norway? Oops, YAML reads this as boolean false!

When the YAML parser loaded this, it didn’t get the string "NO" at all – it got a false value. The application logic expecting country codes probably went “Wait, false? That’s not a country code,” and effectively dropped Norway from the allowed list. Result: every user in Norway was inadvertently denied service for a day. A whole country got feature-flagged OFF because of a capitalization in a config file. Talk about an edge case!

From a senior developer’s perspective, the humor here is equal parts “I’ve been there” cringe and "I can’t believe that actually happened". It highlights the Bugs lurking in the mundane corners of our systems. Who would predict that a simple two-letter country code could slip past code reviews and tests, only to surface as a production outage? This incident underscores why Debugging & Troubleshooting config issues can be so challenging: the code might be fine, but that one YAML setting isn’t doing what you think it is. It’s a reminder that in real systems, edge cases aren’t so edge – they can be entire-country-sized.

The meme cleverly combines Simon Høiberg’s poll about JSON vs YAML with Aaron’s real-life horror story. The left panel shows a JSON config and the right shows YAML – a classic config format war setup. The punchline lands when Aaron reveals how choosing YAML (and not fully accounting for its quirky semantics) led to a spectacular ProductionBug. It’s funny because it’s true: many of us have seen innocent config files turn into ticking time bombs. If you’ve ever been on call at 3 AM, you know the dark humor in “YAML took down Norway” is a coping mechanism – today it was Norway, tomorrow it’s an AWS region named "ON" going offline because someone didn’t quote a string.

Why does this keep happening? Partly, it’s YAML’s design philosophy: being human-friendly. YAML lets you omit quotes and relies on context to guess types. 99% of the time that’s fine, but the other 1% gives us stories like this. At scale, even rare bugs will happen eventually. Organizations might add linting rules or switch to safer config parsers after such an incident. In fact, YAML did adjust its spec in later versions (YAML 1.2) to be less eager about interpreting common words like “NO” as booleans. But many tools and pipelines still use the older YAML behaviors, so these landmines persist in the field.

In summary, the humor here comes from a very relatable place of pain: a tiny bug with huge impact, the absurdity of disabling a whole country due to a file format nuance, and the endless JSON vs YAML debate. It’s an ironic tale of how even senior devs with the best intentions can be tripped up by something as innocuous as a config file. And trust me, after you’ve lived through a fiasco like this, you'll never forget to quote "NO" in YAML ever again.

Description

A screenshot of a Twitter thread discussing configuration formats. The initial tweet by Simon Høiberg asks, 'Do you prefer JSON or YAML when setting up configuration?' and shows two code blocks comparing the syntax of JSON and YAML for a sample configuration. Below this, a reply from Aaron Abramov reads, 'I once disabled our product for the entire country of Norway for a day because `NO` in YAML evaluates to `false`'. This meme highlights a notorious pitfall in YAML known as 'The Norway Problem.' YAML's specification allows for automatic type conversion, meaning it interprets certain unquoted strings like 'NO', 'no', and 'off' as the boolean value `false`. If a configuration file uses the two-letter country code for Norway ('NO') as a string value without quoting it, a YAML parser can silently convert it to `false`, leading to unexpected and potentially catastrophic application behavior, as humorously illustrated by the tweet

Comments

7
Anonymous ★ Top Pick YAML is that 'helpful' friend who automatically turns your shopping list item 'NOrway' into 'false' because they assumed you were being negative. JSON just asks you to be explicit and doesn't cost you a Scandinavian country
  1. Anonymous ★ Top Pick

    YAML is that 'helpful' friend who automatically turns your shopping list item 'NOrway' into 'false' because they assumed you were being negative. JSON just asks you to be explicit and doesn't cost you a Scandinavian country

  2. Anonymous

    YAML taught us that an unquoted “NO” is a boolean; the post-mortem taught us that schema validation is cheaper than explaining to Norway why their country was toggled off

  3. Anonymous

    The real reason Norway has such high software quality standards isn't their education system - it's natural selection from surviving decades of YAML parsers treating their country code as a boolean false

  4. Anonymous

    This is the YAML equivalent of Bobby Tables - except instead of dropping tables, you're dropping entire countries. The real kicker? YAML 1.1's spec includes 22 different ways to represent boolean false (yes, on, off, y, n, true, false, and apparently NO for Norway). It's the gift that keeps on giving, which is why seasoned engineers now treat YAML like a loaded footgun: powerful for simple cases, but one misplaced country code away from an international incident. JSON may be verbose, but at least it won't accidentally geofence your users

  5. Anonymous

    YAML: Human-readable until eval() turns your config into a national incident

  6. Anonymous

    YAML: where ISO codes are booleans - “NO” is false in 1.1, instantly turning Norway into a feature flag; turns out commas in JSON are cheaper than Sev-1s

  7. Anonymous

    YAML 1.1 implicit booleans: the reason our runbook now says “quote ISO‑3166 codes or enjoy a nationwide feature‑flag outage.”

Use J and K for navigation