
- Updated
Learn a programming concept with analogies
This prompt teaches one concept, such as async/await or database indexes, in four steps: a real-life analogy, a definition, a small code example and a common mistake. It then gives you two exercises.
Act as a patient programming teacher. Concept: [e.g. async/await, closures, database indexes, Docker] My level: [e.g. I know basic Python loops and functions] Explain it in four steps: a real-life analogy, a plain definition, a tiny code example with each line explained, and a common mistake beginners make with it. Then give me two small exercises, and wait for my answers before showing solutions.
Say what you already know. The explanation fits much better when it builds on something familiar.
Get a better result
A concept explained in four steps: a real life analogy, a plain definition, a tiny code example explained line by line and a common beginner mistake, then two small exercises that wait for your answers.
The fixed four steps move from familiar to formal, which is how most people learn. Telling it your level stops the explanation from being too basic or too dense, as the tip says. The exercises and the “wait for my answers” rule change it from reading to practice, and practice is what makes a concept stay.
The analogy breaks down and confuses you.
Fix: Ask where the analogy stops being true. Knowing its limit is often the moment the concept makes sense.
- The example uses a language you do not know. Name your language in the level line, such as “basic Python”, and ask for the example in it.
- It shows the exercise answers straight away. Repeat “wait for my answer before showing the solution” on its own line at the end, and reply with your attempt even if it is wrong.
Ask for a second analogy from a different part of life, such as cooking and then traffic, and pick the one that clicks.
Give me one harder exercise that mixes this concept with something I already know, then wait for my answer.
More chat & writing prompts
See all 465 →More like this
- Explain a hard idea with a good analogyChatGPT · Gemini · Claude
- Explain a difficult concept in plain EnglishChatGPT · Gemini · Claude
- Resolve a Git merge conflict safelyClaude · ChatGPT · Claude Code
- Choose a tech stack for your projectClaude · ChatGPT · Gemini
- Plan a safe technology migrationChatGPT · Gemini · Claude



