Fix the Bug

Fix the Bug

All Games

Every snippet has exactly one bug. Spot the mistake and pick the correct fix.

Question 1 of 15 Score: 0 / 0


            

About the Fix the Bug Game

Finding bugs in code you did not write is one of the most valuable skills a developer can have — it is what code review, debugging and technical interviews all test. Fix the Bug gives you short snippets in JavaScript, Python, C# and SQL, each containing exactly one bug, and asks you to choose the correct fix.

The bugs are the kind that slip through real code reviews: off-by-one errors, wrong comparison operators, mutating a value you meant to copy, forgetting to await, missing WHERE clauses and similar mistakes. After every answer, an explanation tells you why the bug happens and how the fix solves it. A full review is shown at the end of the round.

How to play

  1. Read the snippet and the question.
  2. Pick the option that fixes the bug.
  3. Read the explanation, then press Next. At the end, review every question and play again.

Tips for a better score

  • Trace the code with a small example input in your head — most bugs show up on the first or last iteration of a loop.
  • Check boundaries: < vs <=, zero-based indexes and empty inputs.
  • In JavaScript, watch for == vs ===, missing return statements in arrow functions with braces, and async functions that are not awaited.
  • In SQL, a comparison with NULL using = is always unknown; use IS NULL.

Frequently asked questions

Which languages are covered?

JavaScript, Python, C# and SQL, with more JavaScript questions because it is the most widely used language.

Is there always exactly one bug?

Yes. Each snippet contains a single, specific mistake, and one option fixes it.

How does this help with interviews?

Many technical interviews include a "find the bug" or code-review exercise. Practising with short snippets builds the habit of reading code carefully and checking edge cases.

Can I see the explanations again?

Yes. The review at the end of each round lists every question with its explanation.

Related