Code RoomPre-review understanding of AI code
MediumPrep Room Coding #4628

Pre-review understanding of AI code

Vibe & agenticAlgorithms & data structuresMid–Senior~16 min

An AI agent wrote you a Python Spark job that joins clickstream events to a user-dimension table. Before you put it up for review, you want to be able to explain it cold. The agent used a broadcast join hint and partitioned the output by date. In your pre-review read, what specifically must you understand and be ready to justify so you're not blindsided in review — and what's the difference between 'I can explain it' and 'I tested it'?

Implement
audit_spark_join(event_user_ids: list[str], event_dates: list[str], dim_user_ids: list[str], dim_size_mb: int, broadcast_limit_mb: int) → list[str]
Examples
in[["u1","u2","u3"],["2026-01-01","2026-01-01","2026-01-02"],["u1","u2"],8,10]out["dropped=1","broadcast=safe","partitions=1"]
in[[],[],["u1"],12,10]out["dropped=0","broadcast=unsafe","partitions=0"]
in[["a"],["2026-02-01"],[],0,10]out["dropped=1","broadcast=safe","partitions=0"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 16 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.