Explain unfamiliar code in plain English
History
1 version. Every save that changes the prompt is kept.
Version 1
This is the first version, so there is nothing to compare it with.
Explain the code below so I could confidently change it.
My experience level: {{level:comfortable with programming basics, new to this codebase}}
What I am trying to do with it: {{goal:understand it}}
Structure your answer like this:
1. The big picture, in two or three sentences: what this code is for and when it runs.
2. Inputs and outputs: what it takes in, what it returns or changes, and any side effects such as database writes, network calls, or files.
3. A walkthrough in the order the code runs. Group lines into steps and explain each step, not each line.
4. Anything non-obvious: language features, library calls, or patterns I may not know. Explain each in a sentence or two.
5. Why it is probably written this way, where that is not obvious.
6. Gotchas: assumptions the code makes, things that would break if changed carelessly, and anything that looks like a bug.
Rules:
- Use plain words. When you have to use a technical term, define it the first time.
- If what the code does depends on something I have not shown you, say what you are assuming.
- Do not rewrite the code unless I ask.
Code:
{{code}}