TOUGH TONGUE AI
  • Home
    LogoTOUGH TONGUE AI

    RESOURCES

    Loading...

    HomeLibraryPractical Mock · Debug a Race and a Leak

    Practical Mock · Debug a Race and a Leak

    Practical Mock · Debug a Race and a Leak

    Overview

    A debugging round with Theo in a shared editor. A coupon service gives out too many redemptions. Reproduce it, fix it, test it, then answer production questions. Written report after.

    Your Instructions

    Your goal: find why a limited coupon is redeemed too many times, prove it with a test that fails first, fix it, and say what changes when traffic grows.

    How this works (about 30 minutes)

    • The question and code appear in the shared editor. Python only.
    • Read first and say what you notice. Ask Theo for the reports and the numbers you need.
    • The tests choose which request runs next, so you can force the bad ordering. Run them from the editor.
    • Tell Theo when you want him to look at your code.
    • A production turn near the end. No scores during the call; your report comes after.

    What scores well

    • Naming the gap between the check and the write before you edit
    • Reproducing the bug with a test that fails every time
    • A fix you can explain, and a test that proves it
    • Saying what the fix costs and what breaks with a second server

    Tips

    • Take Practical Coach · Debug: Races and Leaks first.
    • Think out loud. Change one thing at a time.

    More in Practical Coding Interview Prep: AI Coach Edition

    • Practical Mock · Make a Slow Service Fast
    • Practical Coach · Debug a Production Error
    • Practical Mock · Debug a Production Error
    • Practical Coach · Hunt the Logic Bug
    • Practical Mock · Find the Logic Bug
    • Practical Coach · Debug: Races and Leaks
    • Practical Coach · The AI-Assisted Round
    • Practical Mock · Review the Agent's Code
    • Practical Mock · AI Lab Room
    • Practical Mock · Meta AI-Assisted Room
    • Practical Mock · Progressive Build Room
    • Practical Mock · AI-Tools Startup Room
    View the full course (32 sessions) →