Londi Tangu

Aug 07, 2026 • 1 min read

Shipping Spanish exposed a grading bug that had been failing English-speaking kids all along

CodeAscent Kids checks a child's program by comparing what it printed to what the mission expected. That check used to be one line:

js

actual.trim() === expected.trim()

Which is correct, and also wrong.

A kid types print("hello space!"). Expected output is Hello Space!. That's working Python, a correct answer, and my app marked it wrong. I'd been watching that happen in English for months and filed it under "kids should be careful."

Then I localized to Spanish and it got indefensible. Now a six-year-old has to produce ¡ — which on a phone keyboard is a long-press on ! — plus exact accents. Correct Python and correct Spanish, still marked wrong. The failure is silent: no error, no explanation, just a red X on an answer that ran perfectly.

So the comparison now forgives everything that's keyboard friction rather than a wrong answer:

js

String(value ?? "")
 .replace(/\r\n/g, "\n")
 .normalize("NFD") // split á into a + combining accent…
 .replace(/[\u0300-\u036f]/g, "") // …and drop the accent
 .replace(/[¡¿]/g, "") // long-press punctuation
 .split("\n")
 .map((line) => line.replace(/\s+/g, " ").trim())
 .join("\n")
 .replace(/\n+$/g, "")
 .trim()
 .toLowerCase()

Case, accents, inverted punctuation, stray spaces — all forgiven.

What it still refuses to forgive: wrong or missing words, and line structure. 3\n2\n1 has to print on three lines, because in several missions print order is literally the lesson. Normalizing that away would mean grading the thing I'm not teaching and ignoring the thing I am.

The rule I ended up with: forgive the keyboard, never the concept.

Join Londi on Peerlist!

Join amazing folks like Londi and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

0

0

0