YAML's 'Norway Problem': Why NO is parsed as False

2025-04-12
YAML's 'Norway Problem': Why NO is parsed as False

YAML's boolean parsing has a frustrating quirk known as the 'Norway Problem'. Because YAML parses the ISO 3166-1 ALPHA-2 code NO (Norway) as the boolean false, it can lead to data parsing errors. This post discusses this issue and suggests using double quotes for escaping or utilizing libraries like StrictYAML to prevent this. Other problematic YAML values include version numbers ending in .0 converting to numbers and strings like 'Null' converting to NULL.

Read more
Development programming issue

Chrome Prototypes Powerful CSS Functions: Expanding CSS Capabilities

2025-03-02
Chrome Prototypes Powerful CSS Functions: Expanding CSS Capabilities

Chrome is prototyping CSS Functions, a game-changer for CSS. This allows developers to create custom functions that compute values based on parameters and custom properties, acting as advanced custom properties. For instance, a `--light-dark()` function could return different colors or font weights depending on system dark mode preference, overcoming limitations of the built-in `light-dark()` function. While still in prototype form in Chrome Canary (requiring the Experimental Web Platform Features flag), this opens up massive possibilities for more expressive and flexible CSS.

Read more
Development