A typo is a typo. A broken bracket is a syntax error.
Syntax Sprint is a typing game that drops you into a real file from today's trending GitHub repo and scores a fumbled bracket or indent apart from an ordinary typo, flashing it red the instant you type it.
You mistype a variable name and you lose one character of accuracy. You fumble the closing brace of a function and you lose... the same one character. Every typing game built for developers scores it that way, because every one of them was built for prose first and had code bolted on later. Monkeytype, TypeRacer, 10FastFingers: swap the word list for snippets, keep the character-match scoring, ship it. But a stray letter in a comment and a dedent that collapses a block are not the same size of mistake. One is a typo. The other is code that doesn't run.
Syntax Sprint is a typing game that takes that difference seriously. It drops you into a real source file, scores structural mistakes apart from ordinary typos, and flashes the structural ones red the instant you make them instead of burying them in an end-of-run tally. It's for the developer who already warms up with speed drills and would rather practice on real brace placement and indentation than on Hemingway quotes.
Tokenize before you touch the keyboard
The trick that makes this work is doing the hard part before the run starts, not during it. Before you type a single character, the snippet goes through a tokenizer that walks the text once and labels every character: this is a bracket, this is an indentation level, this is inside a string, this is a comment, this is an ordinary word. That classification is a standalone module with its own unit tests, deliberately kept out of the React event handlers, so the rule for "what counts as a structural mistake" is auditable in one place rather than smeared across the UI.
Then the scorer reads your keystrokes against that map. Mistype a letter inside an identifier
and it's a typo, counted and moved past. Break a bracket or botch an indent level and the
scorer knows, because the tokenizer already told it that position was structural, and it lands
in a separate column. The run summary shows WPM and accuracy like anything else, plus a line
you won't find elsewhere: structural mistakes, counted on their own. Fumbling a ) should
feel worse than fumbling a variable name, so it does, and the red flash and the shake on the
line happen the moment it goes wrong, not in hindsight.
One nice consequence of tokenizing structure rather than parsing grammar: it doesn't care what language you're typing. Brackets, indentation, and strings look the same to the tokenizer whether the file is TypeScript, Python, Go, or Rust, so all of them score correctly without a per-language parser. The UI just tells you which language today's snippet is.
Today's snippet came from today's GitHub
The other half of the pitch is that the content is never stale. Most typing games draw from a fixed corpus that's been the same paragraphs for months; there's no reason to come back today versus last week. Syntax Sprint pulls its snippet from whatever is trending on GitHub right now.
Here's the small gotcha behind that: GitHub has no public trending API. The trending page you see on the site is generated server-side and not exposed as an endpoint. So the game approximates it with the search API, querying for recently created repositories sorted by stars. A repo that picked up a lot of stars in the last few days is, near enough, what "trending" means, and it needs no scraping and no backend to get. Every API call happens client-side, which keeps the whole thing a single static bundle with zero server infrastructure. When GitHub rate-limits an unauthenticated caller, or is simply unreachable, the game falls back to a small bundled set of snippets rather than showing you a dead page.
That's the honest limitation, too: unauthenticated GitHub calls are capped, so a long session
can run into the ceiling and drop to the fallback set. Dropping a personal access token into a
local .env raises the limit, but for the hosted version the fallback is doing real work.
Try it
Open Syntax Sprint and it fetches today's top trending repo, pulls a syntax-valid snippet, and drops it in front of you. Start typing. Watch the stat rail tick WPM and accuracy live, and notice what happens the first time you miss a bracket: it flashes and shakes right away. Finish the run and read the breakdown, structural mistakes on their own line, then hit it again. If you'd rather read the tokenizer than race it, it's all on GitHub.
This post is part of the build log: every app my automated factory ships gets written up here, honestly. Browse everything at apps.charliekrug.com. Comments are open below.
Loading comments…