Practice reading code you didn't write.
Each puzzle puts you in a real open-source repository, such as requests, Flask, Hono or Zod, pinned to one commit. It asks one precise question: where a behavior lives, which calls a request passes through, how the modules divide the work, or how the code meets a system-design requirement. You find the answer in a browser IDE and click it to submit.
Reading puzzles needs no account. Sign in, free, to submit answers and save your progress.


How a puzzle works
One question, worked from start to finish.
The question
In requests, which class stores response.headers, so that looking up "content-type" finds a header sent as Content-Type? Select a class.
Read the code
Search for response.headers =, which lands in adapters.py line 382, then go to the definition of the class it builds.
psf/requests@ 3c7baaasrc/requests/structures.py
20class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]):21 """A case-insensitive ``dict``-like object.⋮59 def __setitem__(self, key: str, value: _VT) -> None:60 # Use the lowercased key for lookups, but store the actual61 # key alongside the value.62 self._store[key.lower()] = (key, value)6364 def __getitem__(self, key: str) -> _VT:65 return self._store[key.lower()][1]
Select and submit
Put the cursor on the class name and choose Select as answer. Nothing is typed. The server checks it against the puzzle's one answer, and every submission counts as an attempt.
Your answer
src/requests/structures.py#CaseInsensitiveDictCorrect, attempt 1
The written solution unlocks after a correct answer.
What it doesn't do
- No code runs. Puzzles are about reading, not executing or fixing.
- No partial credit. An answer is the exact symbol, file, lines or option, or it's wrong.
- No peeking. A solution shows only after you've solved the puzzle.
- The workspace needs a laptop-size screen. The puzzle list works on a phone.
- Each puzzle's second, blind solve has been done by an automated agent so far, not yet by a person.
Four kinds of puzzle
Each one below is a real puzzle on the site. Open it to read the full prompt and the code.
Find
Locate one specific thing.
honojs/hono
In src/utils/url.ts, select the function that drops a trailing slash from the request path, which is what makes /users/ route like /users when an app is created with strict mode off. Select a function.
- You answer with
- One function, class or method, one file, or one range of lines.
- Written as
path/to/file.ts#Class.method
Trace
Follow calls from a start to an end point.
honojs/hono
From c.redirect to the response builder
In src/context.ts, start at Context.redirect, called with a location and no status. List the chain of functions, in call order, where each one calls the next, until the private method of Context that combines the prepared headers and the status into a new Response is reached. …
- You answer with
- An ordered chain of functions, from the start point to the end point.
- Written as
a.ts#start → b.ts#next → … → c.ts#end
Architecture
How the modules divide the work.
reduxjs/redux-toolkit
In packages/toolkit/src/ (ignore the query/ folder and tests), exactly 4 classes are declared. Select all 4 classes.
- You answer with
- A set of files and symbols, in any order, or one of several listed options.
- Written as
{ a.ts#ClassA, b.ts#ClassB, … }
Design
How a real system meets a design requirement.
pallets/jinja
Interview question: design a least-recently-used (LRU) cache with a fixed capacity, where reading a key makes it the most recently used one. Jinja keeps loaded templates in such a cache, LRUCache in src/jinja2/utils.py. …
- You answer with
- One of several listed options, a function or class, a range of lines, or a set of them.
- Written as
<option-id>, or path/to/file.py#Class.method
Most engineering work happens in code someone else wrote
Before you can change that code, you have to find where a behavior lives, follow a request through its layers, and see where a new piece would belong. It's a skill, and it improves with practice.
Some interviews now test it directly: you get an unfamiliar repository and questions about it. Plenty still ask algorithm questions. codebases is practice for the reading part, with questions that have one checkable answer, so you know whether you found it.
Start with an easy one
Easy Find puzzles name the file or folder to look in, so one search or one jump to a definition gets you to the answer.
Try an easy Find puzzleNew to reading code? Learn starts from your first line of code, with small examples and checks you answer by choosing, before you open a real repository.