Skip to content
Sharp

Service Design · interview question

What does a strong engineer do when reasoning through dto mapping code?

Multiple choiceHardchapter-12-curatedpremiumservice-designdto-mapping
python
def to_order_summary(payload: dict[str, object]) -> dict[str, object]:
    return {"id": payload["order_id"], "status": payload["state"]}
Choose one answer
Answer and explanation

Correct answer

D. Narrate the data shape, the state changes, and the exact rule order step by step.

Why

Interviewers often use simple code to test whether you can reason through execution without bluffing.

Test yourself on Service Design

A free test with instant, explained results. No account needed.

Start free test
All Service Design questions →