Code explainer: what this code does, in plain English
Inherited a script nobody documented? Reviewing a pull request in a language you rarely use? Paste the code or attach the files and your todo.is agent explains it at your level: a one-paragraph summary, a walkthrough of each block, what goes in and out, and the parts that look fragile or unsafe.
The prompt
- Explain this code to me: [CODE OR ATTACHED FILES]. I'm [YOUR LEVEL] and I need to [WHY YOU NEED TO UNDERSTAND IT]. Start with a 3-sentence summary of what it does, then walk through it block by block in plain English, list its inputs, outputs and side effects (files, network, database), and point out anything risky, slow or confusing. If it helps, run it in your workspace on a small example and show me what happens. Finish with a short glossary of the terms you used.
What to change
- [CODE OR ATTACHED FILES]: Paste the code, or attach files (.py, .js, .sql, .xlsm, a zip of a small project).
- [YOUR LEVEL]: E.g. "a beginner who knows some Excel", "a Java developer new to Python", "a product manager, not a coder".
- [WHY YOU NEED TO UNDERSTAND IT]: E.g. "decide if it's safe to keep running", "change the discount rule", "review it before merging".
Example result
- Summary
- This Python script, invoice_reminder.py, reads unpaid invoices from invoices.csv, finds the ones more than 14 days past due, and emails each customer a reminder through your SMTP server. It writes every email it sends to sent_log.csv so customers aren't emailed twice on the same day.
- Block by block
- • Lines 1-12, setup: imports, then reads the SMTP host, user and password from environment variables, so the password isn't in the file
- • Lines 14-25, load_invoices(): opens invoices.csv and keeps rows where status is "unpaid"; dates are parsed as day/month/year
- • Lines 27-34, is_overdue(): compares the due date with today and returns True after 14 days. The 14 is hard-coded; this is the line to change for a different rule
- • Lines 36-52, build_message(): fills a text template with the customer name, invoice number and amount
- • Lines 54-70, main loop: for each overdue invoice, skips it if today's date is already in sent_log.csv, otherwise sends the email and appends to the log
- • Lines 72-75: runs main() only when the file is started directly
- Inputs, outputs, side effects
- • In: invoices.csv, environment variables SMTP_HOST, SMTP_USER, SMTP_PASS
- • Out: reminder emails, new lines in sent_log.csv
- • Side effects: real emails go out every time it runs. There is no test mode
- Risks worth fixing
- • Date format: "03/04/2026" is read as 3 April. If your CSV uses US dates, every overdue check is wrong
- • No error handling around sending: if one email fails, the script stops and later customers get nothing, but the log already shows earlier ones
- Test run
- On 5 fake invoices dated today, 10 and 20 days ago, it selected only the 20-day one, as expected.
- Glossary
- • SMTP: the standard way programs send email
- • Environment variable: a setting stored outside the code, read when the script starts
How to do it with todo.is
- Copy the prompt and paste your code or attach the files.
- Say your level and why you need to understand it; the explanation changes a lot with that.
- Send it in todo.is or message it to your agent on WhatsApp, Telegram or Slack.
- Read the summary first, then the walkthrough. Ask follow-ups like "what does line 31 do?".
Tips for a better result
- Include the files the code imports or calls. Half of a function's behaviour often lives in a helper elsewhere.
- Ask for a diagram of the flow ("draw it as steps") for long scripts with many branches.
- For VBA macros, attach the .xlsm or export the module. Your agent can read the code and tell you what it changes in the workbook.
- Remove passwords, API keys and customer data before sharing code.
- Follow up with "how would I change it to…" and it shows the exact lines to edit.
code explainer: FAQ
- Can it explain code in any programming language? It handles common languages well, including Python, JavaScript, TypeScript, Java, C#, PHP, Go, SQL, bash, VBA and Apps Script. Very old or niche languages may get a less detailed explanation.
- How much code can I send at once? A file or a small project works well. For large codebases, send the folder that matters and say which feature you want explained.
- Will it change my code? No. This prompt only explains it. Ask for a fix or a rewrite separately and you'll get a new version to review.
- Is pasting company code safe? It stays in your own agent workspace and only your agent uses it. Check your company's policy on sharing code with AI tools first.
JavaScript is required to use the todo.is app.