Code Room
Vibe codingMediumvc-g294
Subject Ai collaborationLevel Senior~18 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You're pairing with a junior who's fast and productive with an AI agent but accepts its output almost reflexively. In this session the agent generates a JavaScript function that deduplicates user records by email, and the junior is about to merge it — but it lowercases emails for comparison while storing the original casing, and your service treats the local-part of the email as case-sensitive in a downstream system. The junior didn't notice; the tests the agent wrote don't cover it. How do you handle the moment, and how do you build their verification instinct without killing their velocity?

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.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.