Spot the Bug: a debugging game for developers
Every snippet in Bug Hunt looks fine and contains exactly one bug — an off-by-one, a missing await, a == that should be ===, a mutated array. Click the wrong token. Each find shows the fix as a diff with a one-line explanation, so you learn the gotcha as well as score it.
How to play
- Read the snippet and click the single token that is wrong.
- A correct find adds 5 seconds to the clock; a wrong click takes 5 away.
- Stuck? A hint lights up the right line for 3 seconds of clock; a skip costs 6 seconds and your streak.
- Snippets get harder as you go. The run ends when the clock hits zero.
Controls
- Keyboard & mouse
- Click a token · H hint · S skip · Enter next · Esc to pause
- Touchscreen
- Tap the token you think is wrong.
Scoring
Points for every bug found, with more for harder snippets and long streaks; a hint halves that snippet’s points. Because finds buy time back, a sharp run can last well past the first minute.
Tips
- Start with the line the snippet is clearly about — the bug is usually where the code does its one job.
- Check boundaries:
<against<=,lengthagainstlength - 1. - Look for async code that forgets to
await, and comparisons that use==. - Don’t spray clicks — every miss costs five seconds.
Questions
What language are the snippets in?
JavaScript, the kind you would see in a web app or a Node script. You don’t need to know any framework.
Is it good practice for code reviews or interviews?
It trains the same skill: spotting the one line that is wrong in code that looks right. Every bug comes with the corrected line and the reason it matters.
How many bugs are there?
Thirty-nine snippets, graded by difficulty, so every run starts easy and gets meaner.