Questionthe short answer

How do you use ChatGPT to learn programming?

By Eric Snyder, founderUpdated Oct 31, 2026

To learn programming with ChatGPT, make it ask you questions instead of handing you finished code, because copying code that works teaches you almost nothing. So I'd use the Socrates prompt: it doesn't give you the answer, it asks one question at a time until you work it out, with a small hint if you're stuck twice. It's a pain, and it's the one that sticks. Then I'd explain my code back in plain words, the Feynman technique, and have it tell me where I'm winging it.

If you end up building with Claude Code, Anthropic's coding tool, it has this built in. Its output styles docs describe a Learning style where Claude explains its choices and leaves small pieces of code for you to write yourself, and you switch to it with the /output-style command or the /config menu. That's a nice middle ground, because the job still gets done and you still write the hard part. I'd start with the first-principles prompt, though, so you know what's actually true about the thing you're building before you write a line. The prompts are in my guide to the six learning prompts.

The full guideChatGPT prompts for learning a new topic: 9 to copy and pasteEvery step, prompt and price

More questions on this

Part of: Contractor Marketing, the full guide, with every related question linked.

Rather skip the setup?

Want help setting this up?

Receipts Group builds these systems. Thirty minutes with Eric tells you which piece is worth building first, or that none of them are. The guides stay free either way.