Skip to main content
Building with AI (Vibe Coding)

⏱ About 20 min20 XP

Why Quality Is Your Job

It is tempting to treat an AI coding assistant the way you might treat a vending machine: put in a request, take out the result, move on. That model is dangerously wrong. The AI does not know your users, your security requirements, your performance targets, or the business consequences of a bug. You do. When something you ship breaks, the person held responsible is never the AI — it is you.

What 'Quality' Actually Means

Quality in software is not a vague feeling that code is 'good.' It has concrete, measurable dimensions: Correctness: the program produces the right output for every valid input. Reliability: the program behaves consistently across environments and over time, not just on the developer's machine on a good day. Security: the program does not expose users or systems to unauthorized access or data loss. Maintainability: a future reader — including your future self — can understand, change, and extend the code without introducing new defects. Performance: the program completes tasks within the time and resource budgets users actually experience. AI-generated code can score anywhere on these dimensions. It frequently scores well on quick, isolated correctness and poorly on security and maintainability. Knowing this lets you allocate your review effort appropriately.

The Accountability Gap

An AI language model has no awareness of consequences. It optimizes for producing text that looks like a plausible answer to your prompt. 'Looks plausible' and 'is correct, secure, and maintainable' are not the same thing. The gap between those two properties is exactly the gap you must close.

Consider a concrete scenario. You ask an AI to write a function that calculates a user's age in years from their birth date. The AI produces code that works perfectly for any date after January 1, 1970 — but silently returns a negative number for dates before that, because it used a Unix timestamp internally without validation. The code looks clean. The tests you forgot to write all pass because you only tested recent dates. Six months later, a 55-year-old user gets an error when the app rejects their age as invalid. Who is accountable? You are. The AI is not a contractor you can blame; it is a tool you used.

Shifting from Consumer to Owner

Ownership means you do not accept AI output until you have satisfied yourself that it meets each quality dimension relevant to your context. This requires a mental shift: from 'did the AI give me something?' to 'do I understand what this code does, and do I believe it is correct, secure, reliable, maintainable, and fast enough for its purpose?' In practice, ownership looks like: - Reading every line of AI-generated code before running it. - Asking: what inputs could make this fail? - Asking: what security assumptions is this code making? - Writing at least one test that would catch the most obvious failure mode. - Fixing — not ignoring — warnings and edge cases the AI flagged as 'unlikely.'

Match each quality dimension to its defining question.

Terms

Correctness
Security
Maintainability
Reliability
Performance

Definitions

Can a future developer understand and change this without introducing bugs?
Does it complete its task within acceptable time and resource limits?
Does it produce the right output for every valid input?
Could an attacker exploit this code to access unauthorized data?
Does it behave consistently across environments and over time?

Drag terms onto their definitions, or click a term then click a definition to match.

Why AI Makes This More Important, Not Less

Before AI coding assistants, a developer who wrote a function had, at minimum, thought through it enough to type it. That thinking often surfaced obvious errors. AI removes that friction — and with it, much of that inadvertent scrutiny. You can now accept 200 lines of code in two seconds that would have taken you 45 minutes to type. Those 45 minutes of typing included implicit review. You must now supply that review explicitly. This is not a reason to avoid AI tools. It is a reason to develop a deliberate quality practice that compensates for the scrutiny that typing used to provide.

Speed Is Not Quality

The ability to generate code quickly is not evidence that the code is good. Velocity and quality are independent variables. A builder who ships fast and breaks things is not moving fast — they are moving backward, because debugging and fixing production defects costs far more time than careful review would have.

A student uses an AI to write a payment processing function and ships it without reading the code. A security flaw in the AI-generated code allows unauthorized charges. Who bears responsibility?

Which of the following best describes why AI assistance increases — rather than decreases — the importance of explicit quality review?

Quality Audit on AI-Generated Code

  1. Step 1: Use an AI assistant to generate a function of your choice — something moderately complex, such as 'validate a US phone number' or 'parse a CSV line with quoted fields.'
  2. Step 2: Before running the code, read every line and write down answers to these five questions:
  3. a) What inputs would cause this to fail silently (return a wrong answer without raising an error)?
  4. b) What inputs could cause it to crash?
  5. c) Does it handle empty or null input?
  6. d) Are there any hardcoded values that should be configurable?
  7. e) Is there anything you do not fully understand?
  8. Step 3: Write one test case that targets the most likely failure you identified.
  9. Step 4: Run the test. If it fails, fix the code and document what the AI got wrong.
  10. Step 5: Reflect in one paragraph: how different was the code from what you assumed at first glance?