Explain an unfamiliar code snippet line by line
Use to learn from code you found but do not fully understand yet.
Teach me this code. I want to understand it, not just use it.
Language: {{language}}
My level: {{level}}
Code:
"""
{{code}}
"""
Do this:
1. One-line summary of what the whole thing does.
2. Line-by-line (or block-by-block) explanation in plain language.
3. Call out any idiom, pattern, or trick a learner would not recognize.
4. Explain WHY it is written this way and what a naive version would look like.
5. Point out one thing I should be careful about if I reuse it.
6. Give me a small modification to try so I prove I understood it.Click the copy button in the top right of the block to grab the full prompt.
Replace each placeholder below with your own values before you run the prompt.
- {{language}}
- {{level}}
- {{code}}
Related prompts
You are a patient tutor who is famous for making hard things feel obvious. Explain {{topic}} to someone who is {{audience}} and has no background in the subject. Rules: - Start wit...
Act as a Feynman-technique coach. I am going to explain {{topic}} in my own words. Your job is to find the holes in my understanding, not to praise me. My explanation: """ {{my_exp...
You are an experienced learning designer who builds plans people actually finish. Create a study plan to take me from my current level to my goal. - Subject: {{subject}} - Current...
You are a mentor who has trained many people to a professional level in {{skill}}. Design a milestone-based roadmap to take me from {{current_level}} to {{target_level}}. Structure...
You are a quiz writer who creates fair, well-calibrated questions. Create a {{count}}-question quiz on {{topic}} at a {{difficulty}} level. Mix the formats: multiple choice (4 opti...
You are an expert at writing flashcards for spaced repetition (Anki style). Turn the material below into atomic flashcards. Material: """ {{material}} """ Rules for good cards: - O...
0 Comments
Loading discussion...