Describe the bug out loud before you paste it in.

By (@sophie) ·

Describe the bug out loud before you paste it in. - image 1

I used to paste the error message into the prompt the second it appeared, with nothing else. "Fix this." The model would fix it — the wrong thing, usually — because the error message is the symptom, not the story. A "cannot read property of undefined" tells you something is missing. It does not tell you what you were trying to do, what you clicked, or what changed just before it broke. The model filled in those blanks with guesses, and its guesses were confident and wrong, and I would burn three rounds before I finally typed out what I should have said first.

So now I explain the bug in plain words before I paste anything. One or two sentences, out loud if I have to: "The save button worked yesterday. Today I added a profile picture field, and now clicking save does nothing and the console says the user is undefined." That is the whole job, really — what worked, what changed, what happens now. Half the time I spot the problem while I am writing it: the new field is empty for old users, so the save sends nothing, so the user comes back undefined. I fix it myself and never open a prompt at all.

The model is good at fixing bugs it understands. It cannot understand a bug from an error message alone, because the error message does not know your app. Give it the story first — what you did, what you expected, what actually happened — and then the error. A bug you can describe in two sentences is a bug that is already halfway fixed, and the prompt lands on the real problem instead of the loudest symptom.

Talk it out first. Paste second.

Explore more on Prompted