← Back to work

Tooling

Flow Trainer

· 3 min read

Flow Trainer is a browser-based trainer for learning unfamiliar query languages through nine levels of progressively harder challenges.

Learning a system you've never seen#

The useful skill with any new tool is how fast you can learn a system you've never seen. Practising on a language you already know doesn't train that.

So I built a trainer around two query languages that don't exist anywhere else: FLOW, a pipe-based syntax that reads left to right, and NEST, a nested functional syntax where the innermost call runs first. Both run on the same dataset and the same set of operations, in completely different shapes. You can't memorise your way through, because the second language makes you relearn every operation in an unfamiliar grammar.

The trainer's first level in FLOW: a challenge card with a goal and expected row count, an answer editor, a language toggle between FLOW and NEST, nine level markers and an operations reference where most operations are still locked

How it works#

Both languages run for real. Each has its own interpreter running entirely in the browser (FLOW is a straightforward pipe-stage evaluator, NEST needed an actual tokeniser and parser for nested function calls), executing live against a small two-table dataset. Nine levels per language build the same arc: filter, then select columns, then sort and limit, then group and aggregate, then derived columns, then a join. The whole trainer is a single HTML file with no backend and no dependencies.

Three design choices do most of the teaching:

Every submission is checked against the expected output, so any correct path passes. If your answer took more steps than it needed, the trainer tells you and shows the leaner path. It's the follow-up worth asking once you've got it right: can you do that in fewer steps?

A correct FLOW submission: the query runs live, the result table renders the four matching rows and the feedback line confirms the answer is already the lean path while another hypothesis sits in the scratchpad below

After level nine#

Once you clear all nine levels in one language, the closing screen tells you to switch languages and start again from scratch. The skill being trained was never FLOW or NEST. It's learning an unfamiliar system fast: say the hypothesis out loud before you test it, check a piece of it in the scratchpad and don't bluff past a gap you haven't closed.

Questions about how this was built? Get in touch.