Kodokon kodokon.com

Getting a concept or a piece of code explained

Use explanation levels, analogies, and rephrasing to deeply understand a concept or a piece of code.

7 min · 3 questions

Open this lesson in Kodokon

The AI's most underused superpower: it can explain the same thing at as many levels as needed, without ever losing patience. A textbook has a single level; a human teacher, two or three before they tire. The AI, on the other hand, can explain closures to you like to a ten-year-old, then like to a motivated beginner, then like to a seasoned developer - and it's by comparing these three versions that the click happens.

PROMPT
Explain the concept of "closure" in JavaScript to me at three successive levels:

1. CHILD LEVEL: as if to a 10-year-old, with an analogy from everyday life, zero technical vocabulary.
2. BEGINNER LEVEL: as if to someone who knows variables and functions, with a minimal code example (5 lines maximum).
3. PRO LEVEL: the rigorous definition, what happens in memory, and a real use case where closures are indispensable.

Keep the three levels clearly separated. End by asking me ONE question to check that I've understood level 2.
The three-tier explanation: the analogy gives the intuition, the pro level gives the precision.

Use each level for what it brings. The child level provides the intuition - the mental image you'll keep for years. The beginner level provides the bridge between the image and the code. The pro level provides the precision - the exact terms you'll read in the documentation and hear in an interview. If the pro level stays obscure, that's the signal to rework the level below it, not to reread it on a loop.

Same technique for existing code - a colleague's, a tutorial's, or a library's. The wrong reflex: asking "rewrite this code more simply," which replaces your incomprehension with other code you'll understand no better. The right reflex: asking for a structured explanation, without any rewriting.

PROMPT
Here's some code I'm trying to UNDERSTAND (not to modify):

[paste the code here]

Instructions:
1. Don't rewrite this code, don't suggest any improvement.
2. First explain in one sentence what this code does overall.
3. Then explain it block by block, in the actual order of execution.
4. Point out the 2 or 3 hardest lines for an intermediate learner and detail them with an analogy.
5. End with a question that tests whether I've really understood the central mechanism.
Understanding code without having it rewritten: the order of execution above all.

Finally, never put up with an explanation that isn't landing. "Explain it differently," "give another analogy," "use an example from cooking": rephrasing on demand is free and unlimited. A professional learner doesn't reread the same obscure explanation ten times - they demand a different one.

Knowledge check

Make sure you remember the key points of this lesson.

  1. What is the "child" explanation level useful for, for an adult learning to program?
    • Nothing, it's a waste of time for an adult
    • Building the intuition and the mental image of the concept
    • Replacing the official documentation
    • Preparing for job interviews
  2. Why avoid asking "rewrite this code more simply" when you're trying to understand it?
    • Because the AI always rewrites with bugs
    • Because you replace one uncomprehended piece of code with another, having learned nothing
    • Because it's slower than an explanation
  3. What does "reverse rephrasing" consist of?
    • Asking the AI to repeat its explanation backwards
    • Explaining the concept in your own words and asking the AI to correct only the errors
    • Translating the explanation into another language
    • Asking for three different analogies of the same concept