Loading puzzles…
Loading puzzles…
Each puzzle is set in a real open-source repository. Read the code, find the answer, and select it in the editor.
New to reading code? Start with Learn: short lessons on values, branches, calls and tracing, then puzzles to try next.
Anyone can read the puzzles. Sign in to submit answers and keep track of what you've solved.
67 of 141 puzzles
Matching a request to the code that handles it.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Building the trailing-slash redirect path | Find | Medium | encode-starlettePython | Routing |
| HEAD falls back to GET | Find | Medium | h3js-h3TypeScript | Routing |
| The no-compose fast path | Find | Medium | honojs-honoTypeScript | RoutingMiddleware and hooks |
Code that runs before or after a handler: middleware, hooks, guards and interceptors.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Middleware that returns undefined | Architecture | Medium | h3js-h3TypeScript | Middleware and hooks |
| Callers of callMiddleware | Architecture | Medium | h3js-h3TypeScript | Middleware and hooks |
| The no-compose fast path | Find | Medium | honojs-honoTypeScript |
The path a request takes from arrival to the response sent back.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| A request that was aborted before it started | Trace | Medium | axios-axiosJavaScript | Request lifecycleHTTP clientsErrors |
| Serving a static file conditionally | Trace | Medium | encode-starlettePython | Request lifecycle |
| From request to JSON body | Trace | Medium |
How errors are raised, classified and turned into responses.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Where cancellation errors are born | Architecture | Medium | axios-axiosJavaScript | ErrorsHTTP clients |
| A request that was aborted before it started | Trace | Medium | axios-axiosJavaScript | Request lifecycleHTTP clientsErrors |
| Control-flow exceptions outside ClickException | Architecture | Medium |
Sending requests: redirects, adapters, transports, proxies and request bodies.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Where cancellation errors are born | Architecture | Medium | axios-axiosJavaScript | ErrorsHTTP clients |
| Filling in allowAbsoluteUrls | Find | Medium | axios-axiosJavaScript | Configuration and defaultsHTTP clients |
| A request that was aborted before it started | Trace | Medium |
Deciding when to try again, how long to wait, and when to give up.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Retry-After versus backoff | Architecture | Medium | sindresorhus-gotTypeScript | Retries and timeouts |
| From flush to timeout timers | Trace | Medium | sindresorhus-gotTypeScript | Retries and timeoutsRequest lifecycle |
Tracking what state code reads, and running it again when that state changes.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Diffing a derivation's dependencies | Find | Medium | mobxjs-mobxTypeScript | Reactivity |
| Runaway reaction cycle guard | Find | Medium | mobxjs-mobxTypeScript | Reactivity |
| From a value write to running reactions | Trace | Medium | mobxjs-mobxTypeScript | Reactivity |
Turning templates and schemas into code or into another format.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Compiling the same schema twice | Architecture | Medium | ajv-validator-ajvTypeScript | Compilers and code generationCaching and storage |
| Per-type coercion rules | Find | Medium | ajv-validator-ajvTypeScript | Validation and parsingCompilers and code generation |
| Source text becomes a function | Find | Medium |
Checking input against a schema or type, and converting it.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Where validation keywords are registered | Architecture | Medium | ajv-validator-ajvTypeScript | Extension pointsValidation and parsing |
| Per-type coercion rules | Find | Medium | ajv-validator-ajvTypeScript | Validation and parsingCompilers and code generation |
| The checks behind a string chain | Architecture | Medium |
How modules and providers are registered, resolved and wired together.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| The class behind Depends | Find | Medium | fastapi-fastapiPython | Dependency injectionCode structure |
| Swapping a dependency for its override | Find | Medium | fastapi-fastapiPython | Dependency injection |
| Skipping the global module binding | Find | Medium |
Where a library lets you plug in your own code.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Where validation keywords are registered | Architecture | Medium | ajv-validator-ajvTypeScript | Extension pointsValidation and parsing |
| Default JSON provider | Find | Medium | pallets-flaskPython | Configuration and defaultsExtension points |
| The column that refreshes less often | Find | Medium |
How options are merged, defaulted and looked up.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Filling in allowAbsoluteUrls | Find | Medium | axios-axiosJavaScript | Configuration and defaultsHTTP clients |
| Who makes the module token | Find | Medium | nestjs-nestTypeScript | Dependency injectionConfiguration and defaults |
| Precedence of fallback value sources | Architecture | Medium |
Stores, reducers, actions and thunks.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Detecting a state mutation | Find | Medium | reduxjs-redux-toolkitTypeScript | State managementMiddleware and hooks |
| Thunk condition returns false | Find | Medium | reduxjs-redux-toolkitTypeScript | State management |
| Sorted adapter and removeAll | Trace | Medium | reduxjs-redux-toolkitTypeScript |
Keeping data to use later: caches, key-value stores, eviction and expiry.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Compiling the same schema twice | Architecture | Medium | ajv-validator-ajvTypeScript | Compilers and code generationCaching and storage |
| Drivers that report their own changes | Architecture | Medium | unjs-unstorageTypeScript | Extension pointsCode structureCaching and storage |
Streams of values, the operators that transform them, and subscriptions.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Completing a throttle after its trailing value | Find | Medium | reactivex-rxjsTypeScript | Observables |
| Subscribing to a BehaviorSubject | Trace | Medium | reactivex-rxjsTypeScript | Observables |
Sessions, credentials, and defenses against unsafe requests.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Dropping credentials on cross-origin redirects | Find | Medium | encode-httpxPython | HTTP clientsAuth and security |
How a codebase is split into modules, layers and class hierarchies.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| The checks behind a string chain | Architecture | Medium | colinhacks-zodTypeScript | Validation and parsingCode structure |
| The class behind Depends | Find | Medium | fastapi-fastapiPython | Dependency injectionCode structure |
| Where asdict really recurses | Find | Medium |
Parsing arguments and options, and running commands.
| Puzzle | Type | Difficulty | Repository | Topics |
|---|---|---|---|---|
| Precedence of fallback value sources | Architecture | Medium | pallets-clickPython | Command-line appsConfiguration and defaults |
| Control-flow exceptions outside ClickException | Architecture | Medium | pallets-clickPython | Command-line appsErrors |
| Ordering parameters for processing | Find | Medium |
| First router tried by the default app | Find | Medium | honojs-honoTypeScript | Routing |
| The automatic OPTIONS response | Trace | Medium | pallets-flaskPython | Request lifecycleRouting |
| The most specific mount wins | Find | Medium | unjs-unstorageTypeScript | RoutingCaching and storage |
| From app.request to the middleware chain | Trace | Medium | honojs-honoTypeScript | Request lifecycleMiddleware and hooks |
| Who actually invokes guards, interceptors and pipes | Architecture | Medium | nestjs-nestTypeScript | Middleware and hooksRequest lifecycle |
| Order of response postprocessing | Architecture | Medium | pallets-flaskPython | Request lifecycleMiddleware and hooks |
| Detecting a state mutation | Find | Medium | reduxjs-redux-toolkitTypeScript | State managementMiddleware and hooks |
| h3js-h3TypeScript |
| Request lifecycle |
| From app.request to the middleware chain | Trace | Medium | honojs-honoTypeScript | Request lifecycleMiddleware and hooks |
| Who actually invokes guards, interceptors and pipes | Architecture | Medium | nestjs-nestTypeScript | Middleware and hooksRequest lifecycle |
| Order of response postprocessing | Architecture | Medium | pallets-flaskPython | Request lifecycleMiddleware and hooks |
| Re-raising when no handler matches | Find | Medium | pallets-flaskPython | ErrorsRequest lifecycle |
| The automatic OPTIONS response | Trace | Medium | pallets-flaskPython | Request lifecycleRouting |
| From flush to timeout timers | Trace | Medium | sindresorhus-gotTypeScript | Retries and timeoutsRequest lifecycle |
| pallets-clickPython |
| Command-line appsErrors |
| Rejecting leftover arguments | Find | Medium | pallets-clickPython | Command-line appsErrors |
| Re-raising when no handler matches | Find | Medium | pallets-flaskPython | ErrorsRequest lifecycle |
| Connection errors raised by the adapter | Architecture | Medium | psf-requestsPython | HTTP clientsErrors |
| A Cloudflare KV binding that cannot write | Trace | Medium | unjs-unstorageTypeScript | ErrorsValidation and parsingCaching and storage |
| axios-axiosJavaScript |
| Request lifecycleHTTP clientsErrors |
| Which mounted transport wins | Architecture | Medium | encode-httpxPython | HTTP clients |
| Dropping credentials on cross-origin redirects | Find | Medium | encode-httpxPython | HTTP clientsAuth and security |
| From Client.send to the redirect request headers | Trace | Medium | encode-httpxPython | HTTP clients |
| Sizing a multipart upload | Trace | Medium | encode-httpxPython | HTTP clients |
| Choosing among mounted adapters | Architecture | Medium | psf-requestsPython | HTTP clients |
| Connection errors raised by the adapter | Architecture | Medium | psf-requestsPython | HTTP clientsErrors |
| Dropping the body on a redirect | Find | Medium | psf-requestsPython | HTTP clients |
| Deferring a notified effect | Find | Medium | vuejs-coreTypeScript | Reactivity |
| Dropping dependencies a run did not read | Find | Medium | vuejs-coreTypeScript | Reactivity |
| Truncating a reactive array | Design | Medium | vuejs-coreTypeScript | Reactivity |
| ajv-validator-ajvTypeScript |
| Compilers and code generation |
| From validate to code generation | Trace | Medium | ajv-validator-ajvTypeScript | Compilers and code generation |
| Stripping whitespace before a tag | Find | Medium | pallets-jinjaPython | Compilers and code generation |
| Methods compiled in one pass | Architecture | Medium | python-attrs-attrsPython | Compilers and code generation |
| Tags that are never closed | Find | Medium | textualize-richPython | Compilers and code generation |
| Registry of DOM-only directive transforms | Architecture | Medium | vuejs-coreTypeScript | Compilers and code generationExtension points |
| From baseCompile into the AST walk | Trace | Medium | vuejs-coreTypeScript | Compilers and code generation |
| colinhacks-zodTypeScript |
| Validation and parsingCode structure |
| Skipping a hook nobody needs | Find | Medium | python-attrs-attrsPython | Validation and parsingConfiguration and defaults |
| A Cloudflare KV binding that cannot write | Trace | Medium | unjs-unstorageTypeScript | ErrorsValidation and parsingCaching and storage |
| Dependency injection |
| Who makes the module token | Find | Medium | nestjs-nestTypeScript | Dependency injectionConfiguration and defaults |
| textualize-richPython |
| Extension points |
| Drivers that report their own changes | Architecture | Medium | unjs-unstorageTypeScript | Extension pointsCode structureCaching and storage |
| Registry of DOM-only directive transforms | Architecture | Medium | vuejs-coreTypeScript | Compilers and code generationExtension points |
| pallets-clickPython |
| Command-line appsConfiguration and defaults |
| Default JSON provider | Find | Medium | pallets-flaskPython | Configuration and defaultsExtension points |
| Where the built-in filters are listed | Find | Medium | pallets-jinjaPython | Configuration and defaults |
| Hashing a default mutable class | Architecture | Medium | python-attrs-attrsPython | Configuration and defaults |
| Skipping a hook nobody needs | Find | Medium | python-attrs-attrsPython | Validation and parsingConfiguration and defaults |
| State management |
| Find |
| Medium |
| unjs-unstorageTypeScript |
| RoutingCaching and storage |
| A Cloudflare KV binding that cannot write | Trace | Medium | unjs-unstorageTypeScript | ErrorsValidation and parsingCaching and storage |
| Batch writes across two backends | Design | Medium | unjs-unstorageTypeScript | Caching and storage |
| python-attrs-attrsPython |
| Code structure |
| From a plain string to word-wrap offsets | Trace | Medium | textualize-richPython | Code structure |
| Drivers that report their own changes | Architecture | Medium | unjs-unstorageTypeScript | Extension pointsCode structureCaching and storage |
| pallets-clickPython |
| Command-line apps |
| Rejecting leftover arguments | Find | Medium | pallets-clickPython | Command-line appsErrors |
| From shell completion request to a parsed context | Trace | Medium | pallets-clickPython | Command-line apps |