How to Use AI to Write and Fix Code — Even If You're Not a Developer
You’ve probably heard that AI can write code. Maybe you even tried it once, got something that looked promising, pasted it somewhere — and then nothing worked. Or you got an error message that might as well have been written in another language. Sound familiar?
Here’s what most people don’t realize: the frustrating part isn’t the AI. It’s not knowing how to talk to it about code — and more importantly, how to use it as a back-and-forth helper rather than a one-shot magic button. Once you get that, AI becomes one of the most useful tools you’ve ever touched, even if you’ve never written a line of code in your life.
What Is an AI Coding Assistant, Really?
An AI coding assistant is just a version of an AI chatbot — like ChatGPT, Claude, or Amazon Q — that’s been trained on enormous amounts of code from across the internet. It knows how to read, write, explain, and fix code in dozens of programming languages.
But here’s the key thing to understand: it doesn’t just generate code. It can explain what code does in plain English, help you understand error messages, suggest fixes, and even walk you through changes step by step.
Think of it less like a vending machine (put question in, get code out) and more like a patient, knowledgeable friend who happens to be a programmer and is always available.
How Does It Work?
Imagine you’re baking a cake and you have a recipe in front of you written in French. You don’t speak French — but you have a friend who does, and they can translate it, explain each step, catch any mistakes you make, and suggest substitutions if you’re missing an ingredient.
That’s essentially what an AI coding assistant does with code. You bring the problem, it helps you understand and solve it. You don’t need to speak the language fluently — you just need to describe what you’re trying to do and share what’s going wrong.
How to Try It Yourself
You don’t need any special software to get started. ChatGPT (free at chat.openai.com) and Claude (free at claude.ai) both work well for coding help. Here’s how to approach it:
Start with a plain-English description of what you want:
“I have a spreadsheet with names in column A and email addresses in column B. I want a simple formula that checks if the email address is missing and highlights that row in red. I’m using Google Sheets and I’m a beginner.”
Notice what’s in that prompt: what you have, what you want to happen, which tool you’re using, and your experience level. The more context you give, the more useful the result.
When you get an error, paste it directly into the chat:
“I tried this formula and got an error: ‘Function ARRAYFORMULA parameter 1 expects a single value, but an array was provided.’ Here’s what I typed: [paste your formula]. Can you explain what went wrong and how to fix it?”
You don’t need to understand the error yourself. Let the AI translate it and guide you through the fix.
Ask it to explain before you copy anything:
“Before I use this, can you explain what each part does in plain English?”
This is the step most people skip — and it’s the one that saves you the most headaches later.
Iterate, don’t give up after one try:
If the first answer doesn’t work perfectly, just say so:
“That didn’t work quite right — it’s applying the highlight to every row, not just the ones with missing emails. Can you adjust it?”
This back-and-forth is exactly how you’re supposed to use it. Nobody gets it perfect on the first try — not even experienced developers.
Tips to Get Better Results
Be specific about your tool. “I’m using Excel 2019,” “I’m using Python 3,” or “I’m using Google Apps Script” gives the AI what it needs to give you the right syntax. Generic answers are usually wrong answers.
Share the actual error message word for word. Don’t paraphrase it — copy and paste the full text. Small details in error messages matter, and the AI needs the exact wording to diagnose the problem accurately.
Ask for the simplest version first. Tell the AI: “Give me the simplest possible approach, not the most powerful one.” When you’re starting out, a solution you can understand beats an elegant one you can’t.
Use it to understand, not just copy. After you get working code, ask: “Can you explain this like I’m completely new to coding?” Understanding what you’ve got means you can fix it yourself next time — and you’ll get better at asking questions too.
Don’t be afraid to say “that’s too complicated.” The AI won’t take it personally. Just say: “This is too advanced for me — is there a simpler way to do this that doesn’t require as many steps?” It will adapt.
Closing Thought
The biggest shift in thinking you can make is this: AI coding assistants aren’t a shortcut for developers — they’re a bridge for everyone else. The week that people started searching in droves for help with AI coding tools wasn’t a sign that something went wrong. It was a sign that more people than ever are trying — and trying is the whole game.
Pick one small thing you’ve always wanted to automate or fix on your computer — a spreadsheet task, a repetitive file-renaming job, anything — and describe it to an AI chatbot today. Don’t worry about getting it right on the first try. Just start the conversation.