esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Letโ€™s talk

Iโ€™ll build the agent for it.

Learning Round: Pick Up a New Codebase or API Fast

How to become useful in an unfamiliar codebase or API within a day, with a method you can explain step by step, for your AI interview.

In short

In a learning round, show a method: find where the work enters, run it on one real input, trace that input through the code, then make one small change and check it. Use an AI assistant to read faster, but run what it tells you before you trust it.

13 min readIntermediateOccasional ยท estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

In a learning round I don't try to read everything. I find where a real request enters the system, run it on one example, and follow that one request through the code. Then I make one small change and check that it passes. For an API, I start with authentication, error codes, rate limits and pagination, and I make one working call before I design anything. I use an AI assistant to speed up reading, and I run what it says before I believe it.

What is a learning round, in plain words?

A learning round is a timed exercise where you get a codebase or an API you have never seen, and you have to become useful in it fast. It tests how you learn a system you don't know yet, which is most of the work when the thing that is broken belongs to a customer.

Think of a locum doctor covering a ward for one shift. They don't read every chart in the hospital first. They read the handover notes, check the patients in front of them, and ask the nurse about the one who looks worst. A new engineer on a customer site works the same way, with a much bigger ward.

The worked case below uses a real kind of job. A claims company gives you a Python service of about 400 files and a carrier's payments API (a set of rules other software uses to send it requests). You have 90 minutes before a call with the team, and you must explain how an approved claim gets paid and fix one small bug.

Key words

Entry point
The place where work starts: a web route, a scheduled job or a command you run.
Trace
Following one real input step by step through the code, to see what each part does.
Rate limit
A cap on how many calls you can make in a time window. Going over returns an error.
Pagination
Large lists come back in pages, so one call returns only part of the data.

What is the fastest way to learn a codebase?

Start from the outside and work inward. Each step answers one question, and you stop as soon as you can make your change.

  1. 1

    Read the run instructions

    Find the README, the run command and the test command. Run the tests first, so you know what passes today.

  2. 2

    Find the entry point

    Search for the route, job or command where a real request starts. Follow the entry point and ignore the folder tree for now.

  3. 3

    Run it on one real input

    Use a sample claim from the test data, or a copy in a sandbox. Watch the output, and any log lines (short messages the code prints as it runs), before you read more code.

  4. 4

    Trace that one request

    Step through it with a debugger, a tool that pauses the code so you can move through it one line at a time. Python ships one called pdb.

  5. 5

    Read the tests as examples

    Each test shows a behaviour the authors expected, with a real input and a real result.

  6. 6

    Make one small change and check it

    Change one thing, run the tests, and compare the result with what you expected before you change anything else.

Python's built-in help() shows the documentation for a module or function, so you can ask what it offers without opening every file. That text comes from docstrings, the notes written inside code to explain what it does.

Examples inside docstrings can also act as checks. Python's doctest module runs those interactive examples and fails when the output differs from what is shown.

The learning loop

Ask one question

Where does a claim enter?

Run the smallest test

one input, one call

Read what happened

log line, trace or output

Write the answer down

ready for the next question

  1. 1Pick one thing you do not know yet about the code.
  2. 2Run the smallest test that could answer it.
  3. 3A clear answer goes into your notes.
  4. 4An unclear result sends you back to run a smaller test.
The learning loop in one picture. Each pass asks one question and answers it with the smallest run you can make. A clear answer goes into your notes, and an unclear one sends you back to a smaller test.

A Palantir engineer makes the same point. In an interview on the company blog, the engineer gave this advice:

  • โ€œmy advice is to learn to work with systems, architectures, and codebases you are not familiar with.โ€

    A Palantir engineer, interviewed on Palantir's blog

Back to the claims case. Your first guess is to open the top folder and read in order. After forty minutes you have read eleven files, and none of them moves a claim. The better route is to search the code for the carrier's API address. That finds one nightly job, which reads the approved claims and sends the payment request.

You run that job on one sample claim in a test copy and add one log line. The log shows the payment request with the amount. You see the bug: the job takes the excess off every line item instead of once per claim, so a claim with three items is underpaid by two excesses. You change it to take the excess once, run the tests, and check the sample claim again. That is a result you can show in 90 minutes.

How do you learn an API fast?

An API is a set of rules for asking another system to do something, usually over the web. Learning one fast means finding the few facts that break your first call.

  • Authentication

    Which key or token you send, and where it goes. A common place for a first call to fail.

  • Error codes

    What a 400 means compared with a 429, and what the error body tells you.

  • Rate limits

    How many calls you can make in a time window, and what to do when you hit the cap.

  • Pagination

    How to ask for the next page, so you don't miss rows.

  • State

    Whether the server remembers earlier calls. The Messages API does not, which is the trap below.

Anthropic's API error docs say a 400 means there is an issue with the format or content of your request. So the fix is in your request. Anthropic's SDK (its official code library for the API) retries by default on connection errors, timeouts, and the statuses 408, 409, 429, and 500 and above. A 400 is not on that list, so the SDK does not retry it. The response also carries a request ID, a tracking number that helps when you report a problem.

Rate limits come next. Anthropic's docs say that going over a limit returns a 429 error, and that a retry-after header (a field in the reply that gives the wait time in seconds), when present, tells you how long to wait. Read that header before you write your own retry loop.

The trap is memory. Anthropic's Messages API keeps no record of earlier calls, so your code must send the whole conversation each time. Here is the same mistake in a few lines. The stand-in server only sees the messages sent in each call.

  • โ€œThe Messages API is stateless, which means that you always send the full conversational history to the API.โ€

    Anthropic, Messages API docs

Python
# A stand-in server: it only sees the messages sent in this one call.
def fake_server(messages):
    if any("policy number" in m["text"] for m in messages):
        return "Thanks, I have the policy number."
    return "Which policy number is it?"

history = [{"text": "Claim for policy number P-4417, water damage."}]
question = {"text": "What is the excess on that claim?"}

print("Send only the new question:", fake_server([question]))
print("Send the full history:", fake_server(history + [question]))

Output

Send only the new question: Which policy number is it?
Send the full history: Thanks, I have the policy number.

Only the second call knows the policy number, because it is the only one that carries it. So the app has to resend the history on every call. That costs more tokens, the small pieces of text a model is charged for, and it is the first place to look when a bot forgets what the customer said.

How would you learn a new API in one afternoon?

Walk the interviewer through the order you work in, and say what you are checking at each step.

  • Without a method

    Read the docs cover to cover

    Two hours in, you know what the API could do, and you still cannot make one call.

  • With a method

    One call first, then the edges

    Within the first hour you have one working call. Then you check authentication, errors, limits and paging on that call.

Can an AI assistant help you learn faster?

Yes, with care. Anthropic's context engineering guide explains why it helps. An agent that explores a codebase finds the files it needs as it goes. Claude Code loads its project notes (CLAUDE.md files) up front, then uses search tools to fetch other files just in time. Those tools are glob (finds files by name pattern) and grep (searches inside files).

The same guide's aim is the smallest set of high-signal tokens that still gets the outcome you want. That is a useful test for your own reading too: how little do you need to read to make the change?

Anthropic's Claude Code guide says that the /init command writes a starting version of the project notes file from your codebase. That gives you a map to check before you rely on it.

For a large batch run across many files, the same guide advises trying it on three files first, seeing what goes wrong, fixing the prompt, and only then running the rest.

Tip

Say what you ran and what you saw. Saying that you ran the test and saw the result is far stronger than repeating what the assistant told you.

What does the interviewer want to hear?

A strong answer covers

  • A method: entry point, one real run, one trace, one small change.
  • Your first check of any summary, human or AI, is to run the code.
  • For an API: authentication, error codes, rate limits, pagination, then one working call.
  • Awareness of state: whether the server remembers earlier calls.
  • Notes as you go, so the next person starts ahead of you.
  • Honesty about what you have not understood yet, and who you would ask.

Common traps

  • Trap"I'll read every file from the first folder to the last."

    BetterReading in order takes hours. Find the entry point and follow one real request instead.

  • Trap"The AI summary is right, so I'll build on it."

    BetterTreat a summary as a guess until a run confirms it.

  • Trap"I'll rewrite the messy module first, it's faster."

    BetterRewriting before you understand the flow breaks things you cannot see yet. Make one small change first.

Can you spot the mistake?

Spot the stateless mistake

Which call keeps the claim conversation going?

Quick check

Your first hour in an unfamiliar service: which move gets you the most, fastest?

Can you answer these from memory?

Flash cards ยท tap a card to flip it

1 / 6

What will they ask next?

  1. Q401Re-engineering round: fix bugs in unfamiliar code.12 min
  2. Q397Take-home: a document agent with retrieval and tools.12 min
  3. Q483Fetch from a paginated REST API.12 min
  4. Q399Parse a messy CSV/JSON file with edge cases.12 min
  5. Q403How do you hand off to customer teams?10 min

Last updated on 27 November 2026

Taking over an AI system nobody has documented?

I design and build AI products and agents, including the system behind the screen. Book a short call and tell me what your codebase or API needs to do.