Write the comment first; let the AI write the code
After this, you'll be able to use Cursor (a free code editor with AI built in) or VS Code with GitHub Copilot to produce a working block of code from a plain-English description, without needing to know any syntax first.
Complete Briefing AI like a new colleague first; this lesson builds on writing specific, context-rich requests that AI can act on.
You've avoided writing code because you don't know the syntax. That's not a gap you need to close first. Cursor, GitHub Copilot, and similar editors predict the next line of code the same way they predict text: based on the surrounding code in your file. This means you can describe what you want in plain English as a comment, and the tool translates that description into code. No syntax memorization required.
Now try it. Open Cursor or VS Code with Copilot, create a new file, and write a comment describing one small thing you want the code to do. Tab accepts the suggestion; Escape rejects it. The exercise below uses Claude's chat as a second path when you want a complete block without opening an editor. Both paths require the same skill: describing what you want precisely enough that the AI can write it.
Paste this into Claude
I want to practice writing the precise comment that makes AI code completion work. My task is [describe what you want to automate: what it does, what goes in, what comes out; be specific]. Write me three things: first, the one-line comment for this function in the format '# [verb] [what it does] from [input] and return [output]'; second, the function signature on the next line; third, the complete function body. Show all three so I understand what a precise comment generates. Then tell me: was my description specific enough to write the comment without guessing, or did you have to fill in details I left out?
Check yours against
Open Cursor or VS Code with Copilot, paste your comment as a # line in a new file, and press Tab. If the generated code matches what Claude wrote in the chat exercise, your comment is precise enough. If they diverge, your comment was ambiguous. Tighten the input and output names and try again.
Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.
Before you look back, write the one-line plain-English comment you'd type above a task you want automated, not the one from the exercise. Say what it does, what goes in and what comes out.
One good answer: '# Add up the prices in a list and return the total after a discount percentage.' Then I'd read the suggestion before pressing Tab, and press Escape if it's wrong. If your comment lets someone write the code with no questions, it holds.
Writing a precise comment is the real skill. AI completion translates your description into working code. The better your description, the better the code.