Code Room
Vibe codingMediumvc-g047
Subject Ai verificationLevel Mid–Senior~16 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You asked an assistant to write a regex to validate and extract user emails from free-text comments in a JavaScript service. It produced one that matches every example you tried and the PR is otherwise clean. You don't deeply understand the pattern. How do you verify it's correct and safe before it goes in front of untrusted input — without just trusting that it 'works on the examples'?

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.