CASE FILE Design Sprint Β§2/5 ← FILES DOSSIER PRINT
passage

Reading

The Dev Loop: How Programmers Ship Code With AI

Every working program starts broken. A programmer's job is not to write perfect code the first time β€” it's to iteratively break, test, and fix until the system works.

The dev loop is the concrete cycle you run, over and over:

  1. Build β€” write or modify code
  2. Test β€” run it and see what breaks
  3. Debug β€” understand why it failed
  4. Iterate β€” fix and repeat

This loop happens fast. The best developers run dozens of cycles per hour. Each cycle tells you something: an error message, a silent failure, unexpected behavior, or success that proves your understanding was correct.

With an AI coding assistant (Claude, GitHub Copilot, Cursor), the loop accelerates further. Instead of writing code from scratch, you:

  1. Describe the problem to the AI
  2. Run the code the AI produces
  3. Show the AI the error when it fails
  4. Ask the AI to fix it with the context of the failure
  5. Test again

The AI doesn't run the code β€” you do. The AI doesn't know if the code works β€” you tell it. This is load-bearing. Your job is to be the AI's test harness.

Real example: Building a weather API client

You decide to fetch weather data from an API. You tell Claude:

"Write a Node.js script that fetches the weather for Seoul from the OpenWeatherMap API and logs the temperature."

Claude produces:

const fetch = require('node-fetch');
const apiKey = 'your-key';
const city = 'Seoul';

fetch(`https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}`)
  .then(res => res.json())
  .then(data => console.log(data.main.temp))
  .catch(err => console.error(err));

You run it: node weather.js

Error: Cannot find module 'node-fetch'

You tell Claude:

"I got this error: Cannot find module 'node-fetch'. How do I fix it?"

Claude says: "You need to install it. Run npm install node-fetch."

You run the command, then run the script again.

New error: TypeError: fetch is not a function

You show Claude the error. Claude sees the issue β€” node-fetch v3+ uses ES modules, not CommonJS. It offers:

import fetch from 'node-fetch';
// rest of code...

Or: "Use an older version of node-fetch, or use the built-in fetch in Node 18+."

You choose the second. Run again.

New output: 16.4 (the temperature in Celsius)

Success. The loop closed. You now have working code and understand the actual flow: HTTP request β†’ JSON parse β†’ extract field.

Without the AI, this would have taken you longer and involved more dead ends β€” reading docs, guessing at syntax. With the AI, you spent less time searching and more time running and learning from actual behavior.

Why this matters

The dev loop trains your judgment. Every error teaches you:

  • What inputs the code expects
  • What outputs it produces
  • Where your mental model was wrong
  • How to ask for help in a way that gives the AI enough context

The faster you loop, the faster you learn. Waiting for a 10-minute build, or hesitating to run code because you're unsure, breaks the loop and kills your momentum.

Programmers who ship fast are not smarter β€” they loop faster. They run code constantly, fail cheaply, and adjust. Working with an AI partner means the loop can be even faster, as long as you stay in control: you decide what to build, you run it, you validate the results, and you decide what to ask next.