Skip to content

Lesson 8 of 32Technical rounds

Pair Programming and Practical Coding Rounds

Orient in an unfamiliar repo, ship a feature in small working slices, read docs live, and pair with your interviewer the way a good teammate would.

17 min read0/4 questions

More companies now replace at least one puzzle round with something closer to the job: "here is a small repo, add this feature", or "here are the docs for an API, build a client for it". You share your screen, often in your own editor, and an engineer pairs with you for 45 to 90 minutes. Nobody expects a clever algorithm. They want to see whether they would enjoy working next to you on a Tuesday: how you get your bearings, how you break the work down, how you use tools, and how you take a suggestion. Candidates who are strong at LeetCode often stumble here because they start typing in minute one. This lesson gives you a plan for the round from the first minute to the last.

What the round looks like

Practical rounds come in three common shapes. Ask the recruiter which one you will get, which language, and whether you use your own machine or a hosted environment.

VariantWhat you getWhat they watch
Extend a repoA small working codebase with tests, and a feature requestOrientation, matching conventions, tests for the new behaviour
IntegrationDocs for a real or fake HTTP API and a goal ("sync all customers")Reading docs, pagination, errors, retries, clean boundaries
Build from scratchA spec and an empty project in your own IDEBreaking work down, delivering a working slice, tooling

Stripe's "integration" and "bug bash" rounds are the best-known public examples, and many startups and fintechs run similar formats. Details change, so treat any company's format as reported, not guaranteed, and ask.

The rubric is usually some version of four rows: working code (does something run by the end), code quality (would you merge it), process (orientation, testing, incremental steps) and collaboration (communication, taking input). The last two are where practical rounds differ from a whiteboard problem. A candidate who finishes 70% of the feature with tests and a clear plan for the rest often scores higher than one who finishes 100% in silence with no tests.

A 60-minute practical round
  1. 0-5 min

    Listen and restate

    Repeat the task in your words. Ask what done looks like and what is out of scope.

  2. 5-15 min

    Orient

    Run the app and the tests. Read the entry point and one existing feature end to end. Ask about conventions.

  3. 15-20 min

    Plan the slices

    Say the smallest version that works, then the next two steps. Agree on the order.

  4. 20-50 min

    Build slice by slice

    Write a test, make it pass, run everything, commit. Narrate trade-offs as you choose them.

  5. 50-60 min

    Wrap up

    Run the full suite, say what is left and how you would finish it, ask your questions.

Orient before you type

The first ten minutes decide the round. This is a compressed version of Reading Code You Didn't Write from the Engineering at Work course. A new joiner who changes code before running it is a risk on a real team too, and interviewers know it. Do these, out loud, in this order:

  1. Run the tests. Before touching anything. Now you know the suite is green (or not), how long it takes, and the command. If something already fails, say so: "Two tests fail before my change. Is that expected?" Sometimes it is a planted hint.
  2. Run the app, if there is one. Hit one endpoint or open one page.
  3. Find the entry point (main.py, app.ts, index.js, the router file) and follow one existing feature from the request to the data and back. Pick the feature most similar to yours.
  4. Read one test file. Tests are the fastest documentation of how the authors think: fixtures, naming, what they bother to check.
  5. Ask about conventions. "Do you prefer I add a new module or extend this one? Any style you want me to match?"
What to open first in a small repo
  • billing-service/
  • README.mdrun and test commands, read first
  • pyproject.tomlPython version, test runner, linters
  • app/
  • main.pyentry point: routes are wired here
  • routes/
  • invoices.pythe closest existing feature, trace it end to end
  • services/
  • invoices.pybusiness logic lives here, not in routes
  • clients/
  • payments.pyhow they already call external APIs
  • tests/
  • conftest.pyshared fixtures, fakes for external APIs
  • test_invoices.pyread one test file to learn the style

Narrate as you go, in short sentences: "Routes call services, services call clients. So my new logic goes in a service and the HTTP call goes in clients/, behind the same kind of interface as payments.py." That one sentence tells the interviewer you can learn a codebase. It is the skill they are hiring for, because on the job you will spend more time reading code than writing it (the lesson Reading Code You Didn't Write goes deeper).

Quick check
You open the repo and the interviewer says 'take your time to look around'. What is the best first action?
Need a nudge? A hint rules out a wrong answer.

Pairing behaviours they score

In pair programming the driver has the keyboard and thinks about the line being written. The navigator thinks a step ahead: what comes next, what might break, whether this is the right approach. In an interview you mostly drive, but the interviewer is navigating, and how you use them is scored.

One good pairing exchange
You (driver)Interviewer (navigator)Test runnerplan: one page first, then the cursorwhat about rate limits?good point, I'll add it as slice 3run the pagination test1 passedpassing. committing, then retries

State the next step before typing so the navigator can steer early, when it is cheap.

1/6

The behaviours that score well:

  • Say the next step before you do it. "I'll write a test for the empty case first." The navigator can only help with a plan they can hear.
  • Ask for input on real decisions, not on everything. "I could cache the token in memory or refetch it per request. In memory is simpler and fine for one process. Any preference?" Asking on every line looks like you cannot decide. Never asking looks like you cannot collaborate.
  • Receive suggestions well. If the idea is good, say so and use it. If you disagree, give a reason and offer a cheap test: "I think that would double-count the last item. Can I write a quick test to check?" Arguing from ego is the strongest negative signal in this round.
  • Verbalise trade-offs as you make them. "I'm putting the retry inside get_page so the pagination loop stays simple. The downside is a single slow page blocks the loop, which is fine here."
  • Stay coachable when you are wrong. "You're right, that index is off by one. Fixing it and adding a test."

Interviewers often plant a suggestion that is slightly wrong to see whether you check it or blindly obey. Treat every suggestion the way you would on a real team: thank them, think for five seconds, test it if unsure.

Match the pairs0/5 matched

Match each moment to the response that scores well.

Choose an item, then its match on the other side.

Ship the smallest slice that works

The habit that separates strong candidates is incremental delivery. Do not build pagination, retries and error handling at once and run it at minute 45. Build the thinnest version that runs end to end, prove it with a test, then add one behaviour at a time, running the tests after each. If time runs out, you have something that works and a list of what is next.

Here is an integration round in miniature. The task: "Our vendor's API lists customers 2 at a time. Write fetch_all that returns every customer." The fake API below is shaped like Stripe's list endpoints: a limit, a starting_after cursor and a has_more flag. Slice 1 ignores pagination entirely, on purpose.

Pythonslice_1.py
class FakeCustomersAPI: """Stands in for a vendor's list endpoint, shaped like Stripe's.""" def __init__(self, customers, fail_on_calls=()): self.customers = customers self.calls = 0 self.fail_on_calls = set(fail_on_calls) def list(self, limit=2, starting_after=None): self.calls += 1 if self.calls in self.fail_on_calls: return {"status": 429, "retry_after": 2} ids = [c["id"] for c in self.customers] start = 0 if starting_after is None else ids.index(starting_after) + 1 page = self.customers[start:start + limit] return { "status": 200, "data": page, "has_more": start + limit < len(self.customers), } CUSTOMERS = [{"id": f"cus_{n}", "email": f"user{n}@example.com"} for n in range(1, 6)] # Slice 1: one page, no pagination, no retries. Ugly but proven.def fetch_all(api): return api.list()["data"] api = FakeCustomersAPI(CUSTOMERS)first = fetch_all(api)assert [c["id"] for c in first] == ["cus_1", "cus_2"]print("slice 1 passes:", [c["id"] for c in first])print("but there are", len(CUSTOMERS), "customers")
Output
Press Run (⌘ Enter) to see what happens.

That took three minutes and it proves you can call the API and read the response shape. Say so: "One page works. Next, I follow the cursor until has_more is false. Then I handle 429s." Then build slices 2 and 3, each with its own test. The fake clock is the important design choice: the retry code takes sleep as a parameter, so the test records the waits instead of really sleeping. Interviewers like this because it is how you test time-dependent code at work.

Pythonfetch_all.py
class FakeCustomersAPI: def __init__(self, customers, fail_on_calls=()): self.customers = customers self.calls = 0 self.fail_on_calls = set(fail_on_calls) def list(self, limit=2, starting_after=None): self.calls += 1 if self.calls in self.fail_on_calls: return {"status": 429, "retry_after": 2} ids = [c["id"] for c in self.customers] start = 0 if starting_after is None else ids.index(starting_after) + 1 page = self.customers[start:start + limit] return {"status": 200, "data": page, "has_more": start + limit < len(self.customers)} CUSTOMERS = [{"id": f"cus_{n}", "email": f"user{n}@example.com"} for n in range(1, 6)] class RateLimited(Exception): pass def get_page(api, starting_after, sleep, max_attempts=3): """Slice 3: retry a 429, waiting as long as the server asks.""" for attempt in range(1, max_attempts + 1): resp = api.list(starting_after=starting_after) if resp["status"] == 200: return resp if attempt < max_attempts: sleep(resp["retry_after"]) raise RateLimited(f"still 429 after {max_attempts} attempts") def fetch_all(api, sleep): """Slice 2: follow the cursor until has_more is false.""" results, cursor = [], None while True: resp = get_page(api, cursor, sleep) results.extend(resp["data"]) if not resp["has_more"]: return results cursor = resp["data"][-1]["id"] # Tests, one per slice. The fake clock records waits instead of sleeping.waits = []api = FakeCustomersAPI(CUSTOMERS)assert [c["id"] for c in fetch_all(api, waits.append)] == [f"cus_{n}" for n in range(1, 6)]assert api.calls == 3 and waits == [] api = FakeCustomersAPI(CUSTOMERS, fail_on_calls={2})assert len(fetch_all(api, waits.append)) == 5assert waits == [2], waits api = FakeCustomersAPI(CUSTOMERS, fail_on_calls={1, 2, 3})try: fetch_all(api, waits.append) raise AssertionError("expected RateLimited")except RateLimited as e: print("gave up cleanly:", e) print("all slices pass, API calls in the happy path: 3")
Output
Press Run (⌘ Enter) to see what happens.

Things worth saying out loud while you build this, because each one is a rubric point:

  • "I use the last item's id as the cursor, because that is what the docs say starting_after takes." (You read the docs.)
  • "I cap retries at 3 and raise a named error, so a caller can tell 'rate limited' from 'bug'." (Error handling with intent.)
  • "In production I would add jitter to the wait and log each retry, and I would ask whether this runs in a request or a background job, because a job can wait longer." (Production awareness without gold-plating.)

Try extending it yourself: add a max_pages safety limit so a server bug that always returns has_more: true cannot loop forever, with a test that proves it.

Predict the outputPython

What does this print?

pages = {None: ([1, 2], "a"), "a": ([3, 4], "b"), "b": ([5], None)}
items, cursor = pages[None]
out = list(items)
while cursor is not None:
  items, cursor = pages[cursor]
  if cursor is not None:
      out += items
print(out)
Need a nudge? Hints walk you through it.

Reading docs live

Looking things up is allowed in nearly every practical round, and it is expected in integration rounds. What they watch is how you do it.

  • Say what you are looking for before you search. "I need to know whether the cursor is the last id or an opaque token." This turns a silent minute into visible reasoning.
  • Go to the right section. For an API: authentication, the list endpoint, pagination, errors and rate limits. Skip the marketing overview.
  • Copy the shape, not the whole example. Read the example request and response, then write your own code against that shape.
  • Use the language docs for the exact signature, not for concepts you should know. Checking whether dict.get takes a default is fine. Searching "how to loop over a list" in a mid-level round is not.

Ask the AI policy before the round. Some companies now allow an AI assistant in specific rounds and many ban it. If it is not mentioned, assume it is banned and ask.

Tooling fluency

Your editor and terminal are part of the performance. Fumbling for five minutes to run one test eats a tenth of the round. Before the interview, rehearse these in the language you will use:

pytest -x -q                         # stop at the first failure, quiet outputpytest tests/test_invoices.py -k pagination   # run only matching testsnpx vitest run src/sync.test.ts      # one JS/TS test filegit statusgit diffgit add -Agit commit -m "Follow the cursor until has_more is false"

Also know how to set a breakpoint in your editor or drop breakpoint() into Python, jump to a definition, search the whole project for a symbol, and rename a variable everywhere. Committing after each green slice is a small thing that interviewers notice: it shows you work in reversible steps, and if a later slice goes wrong you can git diff against the last good state instead of guessing. If the round is in a hosted editor without your shortcuts, practice in that tool beforehand, most offer a free sandbox.

When things go sideways mid-round

The build breaks and you do not know why. Stop adding code. Run the last command that worked, read the first error (not the last), and say your hypothesis. If a recent edit caused it, git diff shows exactly what changed. The Debugging Rounds lesson covers this loop in depth.

You realise your design is wrong at minute 35. Say it plainly: "Putting the retry in the loop made the cursor logic tangled. I'm going to move it into its own function. It costs five minutes and makes the rest simpler." A deliberate, explained change of course is a positive signal. A silent rewrite is not.

The interviewer goes quiet. That is normal. Some are told to stay hands-off. Keep narrating and keep asking short, specific questions at real decision points.

You do not know a library. Say so, and say how you would find out: "I haven't used this HTTP client. I'll check how clients/payments.py calls it and copy that pattern." Matching the codebase beats importing your favourite library.

Put it in order6 steps

Put these steps of a practical round in a sensible order.

  1. Tap the steps below in the right order.
Need a nudge? A hint shows where it starts.
Key terms
practical round
An interview where you build or change real-looking code in a repo or against an API, instead of solving an isolated puzzle.
integration round
A practical round where you read an API's docs and write a client for it, usually covering pagination, errors and retries.
driver and navigator
The two pair-programming roles: the driver types and focuses on the current line, the navigator thinks ahead about direction and risks.
vertical slice
The thinnest version of a feature that works end to end, built first and then extended one behaviour at a time.
cursor pagination
Fetching a list page by page by passing a marker from the previous page, such as the last item's id, instead of a page number.
fake
A small working stand-in for a real dependency, such as an in-memory API or a recorded clock, used to make tests fast and deterministic.