Lesson 10 of 10 · Own the code AI writes
When to stop prompting and ask a developer
When to stop prompting and ask a developer, or hire one: the signs the AI is stuck, the parts of an app not to go it alone on, and how to ask for help.
An AI tool never gets tired, never gets embarrassed and never says "I don't know, ask someone else". That's useful when you're stuck late at night. It's also why it'll happily send you round the same problem for three hours, a little more sure of itself each time.
Knowing when to stop is a skill, and hardly anyone teaches it. This last lesson does.
Signs it's time to stop
You don't need all of them. Any one is enough to stop and think.
- You're going round in circles. The same error comes back after three fixes, or each fix breaks something else.
- You can't say what changed. The AI has edited a dozen files and you couldn't explain the diff (lesson 9).
- The AI keeps starting again. It rewrites whole files to fix small problems. That usually means it's lost the thread.
- It's agreeing with everything. You suggest a cause and it says you're right, every time, whatever you suggest.
- You're afraid to touch it. The app works and you don't know why, so nobody dares change anything.
When you see one, do the things from lesson 7: stop, go back to the last commit that worked, read the error yourself. If that doesn't get you moving, it's time for a person.
Where not to go it alone: when to hire a developer
Some parts of an app are fine to learn on. A broken layout costs you an afternoon. These ones can cost much more, and they're where I'd always want a second pair of eyes before real people use them:
- Payments. Anything that charges, refunds or works out a price.
- Logins and permissions. Who can sign in, and who can see or change what.
- Personal data. Names, emails, addresses, anything about health or money. In the UK, data protection law applies to you whoever wrote the code.
- Anything you can't undo. Deleting data, sending emails to all your customers, changing a live database.
- Launching. The day real customers arrive is the day almost-right turns into wrong.
Look back at the three things your app must never get wrong, the ones you wrote down in lesson 1. If any of them goes through code you can't read, that's where to spend money on help.
How to ask for help with code
Whether you're asking a developer, a forum or a friend, a good question gets a good answer much faster. Bring:
- What you expected and what happened. In one sentence each.
- The exact error, all of it, copied as text rather than a photo of your screen.
- The steps to make it happen. "Log in as a customer, go to /orders, press the second order."
- What you've tried, and what happened each time.
- The smallest piece of code that shows the problem. Not the whole project. Cutting it down often finds the answer by itself.
- Your map from lesson 2. What it's built with, where the data goes, where the secrets are. A developer will ask for it first.
And never send secrets, even to someone you trust. Send the names of the settings, not the values.
Where to ask
- The tool's own community. Most frameworks and services have a forum, a GitHub discussions page or a Discord where the people who make it answer questions.
- Stack Overflow. Search first: your question has probably been asked. If not, the six things above are close to what a good question there looks like.
- Local meetups. Developers are generally kind to people who've done their homework, and a room of them will teach you more in an evening than a week of prompting.
- A developer, for an hour or a project. When it's your business on the line, pay someone who's responsible for the answer.
What a good developer will do with AI-written code
If you hire someone to look at an app you built with AI, here's what good looks like:
- They read before they judge. "Start again from scratch" might be right, but not before they've looked.
- They tell you what they found in plain English, ranked by what matters most, not a list of every style they'd have done differently.
- They fix the dangerous things first: the permissions, the payments, the secrets.
- They leave it more understandable. A README, notes on why things are how they are, a map like yours.
I've written about how AI is changing web development, for people paying for a website, and about who can explain yours. Both are worth reading before you hire anyone.
What you can do now
Look at how far you've come. You can now:
- Find your way around a project you didn't write, and map it
- Read a component line by line and say what it assumes
- Get an AI to explain code, and check whether it's right
- Spot the eight kinds of almost right
- Keep your secrets out of the browser and out of the repo
- Read an error and find its cause
- Undo a change with Git
- Review a diff before you accept it
- Know when to stop and ask
That's not everything a developer knows. It's the part that decides whether what you've built can be trusted, and it's the part AI can't do for you. Keep using AI. Keep reading what it writes.
Where to go from here
- Keep learning the trade. If you want to write code from scratch too, freeCodeCamp, The Odin Project and Harvard's CS50 are free and good.
- Work through it with me. I do one-to-one coaching on your own code: we read what the AI wrote together and decide what to keep.
- Get it checked before launch. If you've built an app with AI and real customers are about to use it, my launch-readiness review is a fixed-price check with a written report of what to fix first.
If you built something with AI
What to check
- Go through the list of "where not to go it alone" and mark which apply to your app. For each one, can you read the code that handles it?
- If you're stuck right now, write the six-part question from this lesson, even if you never send it. Writing it down solves more problems than you'd think.
- Find the community for the main tool or framework your app uses, and bookmark it.
- Decide who you'd call if your app broke on a Friday evening. If the answer is "the AI", find a person.
If you're learning the trade
Try it
Go back to the first exercise in this course: the function you read line by line in lesson 1.
- Read it again now, without help. Write down what it does, what it assumes, and what happens when it fails.
- Compare that with what you wrote in lesson 1.
- Pick something in your own project you still can't explain. Write the question you'd ask a developer about it, using the six parts from this lesson.
Then, if you like, send it to someone. Asking well is a skill too, and you've just practised it.