← Rillet Interview Insights

Rillet·Backend Engineer·Technical Phone Screen·Senior

Senior
Apr 2026Remote

Summary

Pair-programming interview at Rillet for a backend role where you build an Account Service from scratch in Python using TDD, incrementally adding features while the interviewer watches every keystroke. Pretty intense format if you're not used to writing tests before code.

Questions Asked (1)

Q1

Build an Account Service incrementally using TDD in Python, starting from a blank project. Each feature (open account, deposit, withdraw, transfer, balance lookup, overdraft rules) gets a failing test first, then the simplest passing implementation, then a refactor.

Technical Trade-offsAPI & IntegrationsSystem Design
Author's notes

The red-green-refactor rhythm sounds obvious until someone is watching you type and you instinctively want to write the full implementation before the test.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope and constraints (e.g., single currency, concurrency, persistence) before diving into code. Then walk through the TDD cycle for each feature, emphasizing the red-green-refactor rhythm and how you'd evolve the design incrementally. Finally, discuss trade-offs and how you'd handle edge cases like overdrafts and transfers.

Pro tip: Demonstrate discipline by resisting the urge to over-engineer early; keep each implementation as simple as possible to pass the test, and let the design emerge through refactoring. This shows you understand that TDD is a design tool, not just a testing technique.

1. Clarify requirements and constraints

Ask questions to understand the expected behavior, edge cases, and non-functional requirements (e.g., concurrency, persistence, currency). This ensures you're solving the right problem and sets the stage for incremental development.

2. Set up the project and first failing test

Create a minimal project structure with a test framework (e.g., pytest). Write a failing test for the first feature (open account) that defines the expected API and behavior.

3. Implement the simplest passing code

Write just enough production code to make the test pass, even if it's hardcoded or naive. This validates the test and keeps momentum.

4. Refactor and repeat for each feature

Refactor to improve design without changing behavior, then move to the next feature (deposit, withdraw, etc.). Repeat the red-green-refactor cycle, ensuring each new test drives new functionality.

5. Discuss trade-offs and next steps

After covering all features, summarize design decisions, trade-offs (e.g., simplicity vs. extensibility), and how you'd handle production concerns like concurrency, persistence, and error handling.

Key Points to Mention

  • Red-green-refactor cycle: write a failing test, make it pass, then refactor.
  • Start with the simplest possible implementation to pass the test, avoiding premature optimization.
  • Use tests to drive the API design and discover edge cases (e.g., negative amounts, insufficient funds).
  • Incremental development: each feature builds on the previous, with tests ensuring no regressions.
  • Trade-offs: balancing simplicity, extensibility, and performance; when to introduce abstractions.
  • Production considerations: concurrency control, transaction atomicity, persistence, and error handling.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.