Code Room
Vibe codingEasyvc-g420
Subject Ai prompt specLevel Entry–Mid~12 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You need a config loader for a Python service that reads settings from environment variables, applies defaults, coerces types (a port is an int, a feature flag is a bool, a timeout is a float), and fails loudly at startup if a required value is missing or malformed. You'll ask an AI agent to write it. Draft the prompt/spec with the constraints, edge cases, and acceptance criteria that make the agent get it right first try. What does a vague prompt ("parse my config from env") miss?

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.