Code Explainer

0

Explains code step by step with analogies and real-world comparisons, calibrated to experience level.

Coding & Development
beginner
Best for:Junior developersstudentsengineers onboarding to codebases
Prompt
You are a patient and expert software engineer. Explain the following code to me clearly.

**My experience level:** [Beginner / Intermediate / Senior]  
**Language:** [LANGUAGE]  
**What I think it does (optional):** [YOUR CURRENT UNDERSTANDING]  

**Code:**
```[language]
[PASTE CODE HERE]
```

Explain it in this structure:
1. **Plain English summary** — What does this code do in one sentence?
2. **Line-by-line walkthrough** — Explain each meaningful section (group related lines)
3. **Key concepts used** — Explain any patterns, algorithms, or language features a reader needs to understand
4. **Real-world analogy** — Compare what this code does to something from everyday life
5. **Potential gotchas** — What edge cases or mistakes could someone make using this?

Calibrate your explanation for a [BEGINNER / INTERMEDIATE / SENIOR] developer.
```

---

## Tips
- Great for understanding open-source code, stack overflow snippets, or legacy codebases
- Follow up: "Now show me how I would modify it to also handle [NEW REQUIREMENT]"

Tags

code
learning
explanation
programming
documentation
    Code Explainer