So I'm doing Toggle Wars (the WeMakeDevs x Flagsmith hackathon), and instead of building another todo app with a feature flag slapped on, I built a game where the experiment IS the game.
The idea
Spot the Bug (https://doomsage.github.io/spot-the-bug/) is a 3-minute quiz. You get real-looking JavaScript snippets, and each one has a bug hiding in it. An off-by-one loop, a var where a let should be, an async function nobody awaited. You click the line you think is broken. Wrong answers cost you, right answers get you streaks. It's the kind of thing you finish and immediately want to retry because you KNOW you saw that closure bug.
I picked bugs that have actually bitten me or people I know, so if you write JS for a living, some of these will feel personal.
The experiment hiding inside
Here's the hackathon part. When you get an answer wrong, the game has to teach you something. But HOW should it do that? I had two competing instincts:
- hint_then_retry: give you a nudge, let you try the same snippet again, reward the recovery
- explain_now: show the full explanation immediately, keep the pace fast
I genuinely didn't know which one makes people play better. So instead of arguing with myself, I wired it up as a real A/B experiment with Flagsmith. A multivariate flag (wrong_answer_feedback) decides which feedback style you get, and Flagsmith's Experimentation tracks what happens next: on your very next question, do you get it right?
That's the metric: paired_followup_correct - whether you answer correctly right after being taught. If hints make the learning stick, that number should be higher for hint players. If instant explanations work better, it shows there.
My prediction (locked before launch)
Before anyone played, I wrote down my call: hint_then_retry wins. My reasoning: re-trying forces you to actually find the bug yourself the second time, and that effort is what makes it stick. Instant explanations feel good but you skim them.
I'm logging this publicly so I can't quietly edit my priors after the results come in. Science!
What I've learned so far
Honest status: the experiment is live and collecting, but the data is still thin. I only just started sharing the game, so enrollment is in single digits and both arms need a lot more players before the win probability means anything. Flagsmith's Bayesian engine also shows a credible interval next to the result, and right now that interval crosses zero, which is stats-speak for "we don't know yet". I'm not going to pretend otherwise.
What I already know: building the game was the easy part. Getting real humans to play it is the actual boss fight.
Come be a data point
Play it, tell me your score, and if you spotted a bug in my bug-spotting game (meta, I know), the repo is https://github.com/doomsage/spot-the-bug/
Every play genuinely helps - you're one visitor in a live experiment, and your clicks decide which feedback style ships. If the results are interesting (or embarrassing), I'll post a follow-up with the numbers after the hackathon.
Play here: https://doomsage.github.io/spot-the-bug/
Built for Toggle Wars. Flagsmith handles the flag, the experiment split and the stats; the game is vanilla JS on GitHub Pages.
