Code Room
Vibe codingHard
Question
You asked an AI to "create one IAM user per developer from a list." It used `count`. The first apply is fine, but a teammate warns it's a trap. Why, and what fails later?
variable "developers" { type = list(string) default = ["alice", "bob", "carol", "dave"]} resource "aws_iam_user" "dev" { count = length(var.developers) name = var.developers[count.index]} resource "aws_iam_user_policy_attachment" "dev" { count = length(var.developers) user = aws_iam_user.dev[count.index].name policy_arn = var.dev_policy_arn}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.
Learn the concepts
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.