Interview Gym: coding practice that fits a train ride
Updated
Most of my practice happens on the train. Twenty minutes, standing, one hand on the phone, and a signal that drops in the tunnels. For a while I tried to do LeetCode in that window, and it never quite worked. leetcode.com is built for a laptop. On a phone it felt chunky: the problem, the editor and the keyboard all fight over one small screen, and every bracket is a trip to a second keyboard layer. I spent more of the ride fighting the page than thinking about the problem.
So I built my own. It is called Interview Gym, and it lives inside Telegram.
A session looks like this:
- A short lesson. Each new topic opens with one page: the idea in plain words and a small example. Two pointers, prefix sums, heaps, ring buffers. It takes under three minutes to read.
- One function to fill in. You get a signature and a short problem, the way a real round starts, and you write the body.
- Real tests. Your code runs in an isolated container: Python 3, or g++ with sanitizers for C++. You see which tests passed and, for the first one that failed, the input, what you returned and what was expected.
The app also decides what comes next. There is no menu of thousands of problems to scroll through. Today’s queue gives you one new problem (you pick one of three) plus the reviews that spaced repetition says are due, sized for one ride.
Intuition over memorising
What I want from practice is intuition: seeing a problem and knowing which tool it wants. Grinding hundreds of problems without that mostly builds memory of specific answers. A few choices push the other way:
- The lesson comes before the drill, so you meet the idea first and use it straight away.
- When you are stuck, a hint unlocks after three failed runs, and the solution only after that. Seeing the solution counts as a miss, and the problem comes back sooner. You cannot skip the struggle, but you do not stay stuck forever either.
- After a pass you get up to five review notes on style, from ruff for Python and clang-tidy for C++. Passing the tests is not the same as writing code an interviewer wants to read.
- Some drills are refactors. You start from working but messy code and clean it up without breaking a test.
- For systems topics I have started on teach-back lessons. You read how Kubernetes takes a manifest to a running pod, then explain it back in a sentence or two, and a model grades whether you got the idea.
No AI, no autocomplete
In a real interview on CoderPad or HackerRank there is no Copilot, no autocomplete and nothing to paste from. At work, AI writes most of my code now, and I noticed I had gone rusty at typing a correct function from a blank page. So Interview Gym has none of those either. Autocomplete is off, and paste only works for text you copied inside the editor. The habits you build on the train are the ones you take into the room.
Made for a phone
This is the part that started it all, so it is where most of the time went.
- Tunnels are fine. Your code is saved on the device. If the signal drops, the run waits and goes through when you are back online.
- At the weekend there is a 45-minute timed session on Telegram Desktop, with the clock held on the server, for practising under real conditions.
What is inside
The problems come from real job listings, not a generic list. I went through 34 quant developer listings plus interview reports, and built four tracks around what they asked for:
| Track | What it covers |
|---|---|
| Python problem-solving | The standard patterns: hashing, two pointers, sliding window, binary search, heaps, graphs, dynamic programming |
| Practical builds | A rate limiter, an LRU cache, a key-value store, an order book |
| C++ for low latency | Ring buffers, an SPSC queue, object pools, atomics, RAII |
| Systems | Linux, networking and hardware, as short quizzes |
That comes to 120 Python drills, 22 C++ drills and 30 quizzes so far, and it grows as I go.
Under the hood it is a Telegram Mini App served by a Cloudflare Worker, with D1 for progress and Cloudflare Containers for running code. Your Telegram account is your sign-in, so there is nothing to sign up for.
Try it
Interview Gym is open to friends while I find the rough edges. Open @InterviewCodeGymBot on Telegram, send /start, and I will let you in.
I built it for my own commute first. I might open source it one day. Until then, if you try it, tell me what breaks.
Sincerely,
Sean