Skip to content

Results for “code explanation”

9 prompts

Explain [data structure, e.g. a hash map / heap / trie] for a [level] developer. Include a text diagram, how operations work with time complexity, a clean implementation in [language], and when to use it in real projects.

ChatGPT
Coding & Development

Data structure explanation with code

Explains a data structure with visuals and an implementation.

Explain this pull request diff for a reviewer. Summarise what changed and why (as far as you can tell), list risky areas, possible bugs, missing tests, and questions to ask the author. Diff: [paste diff]

Claude
Coding & Development

Explain a pull request diff

Summarises what a PR changes and what to watch for.

Act as a senior software architect. Project type: [web app, API, mobile app, library] Stack: [details] Team size and expected growth: [details] Features: [list] Propose a folder structure (with explanation of each folder), layering (e.g. routes, services, data access), naming conventions, where tests live, configurati…

ChatGPT
Coding & Development

Project folder structure and architecture

Organise a new or growing project with a clean, scalable folder structure and conventions.

Act as an algorithms tutor. Problem: [paste problem statement] Language: [language] Explain: 1. The problem in simple words with a small example 2. A brute-force approach and its complexity 3. The key insight that leads to the optimal approach 4. Step-by-step walkthrough on the example 5. Clean, commented code 6. Time…

ChatGPT
Coding & Development

Coding challenge explained step by step

Understand algorithm problems: intuition, brute force, optimal approach, complexity and clean code.

Act as a data analyst using Python and pandas. Data: [file type and columns with example values] Questions I want answered: [list] Issues I know about: [missing values, inconsistent formats] Write a script or notebook steps to: 1. Load and inspect the data 2. Clean it (types, missing values, duplicates, outliers) 3. A…

ChatGPT
Coding & Development

Data analysis with pandas

Load, clean, analyse and chart your data with pandas, with explanations for each step.

Explain this error in plain English and help me fix it. Language/framework: [e.g. Python 3.12 / Node 20 / Laravel] What I was doing: [action] Error: ``` [paste error and stack trace] ``` Relevant code: ``` [paste code] ``` Please give: 1. What the error means 2. The most likely cause (and other possible causes) 3. The…

ChatGPT
Coding & Development

Explain an error message and fix it

Paste a confusing error or stack trace and get a plain-English explanation, the likely cause and a fix.

Act as a regular expression expert. Regex flavour: [JavaScript / Python / PHP (PCRE) / Java / .NET] What I need to match: [describe, e.g. UK postcodes, dates in DD/MM/YYYY, URLs without query strings] Should match: [examples] Should NOT match: [examples] Please give: 1. The regex 2. A token-by-token explanation in pla…

ChatGPT
Coding & Development

Regex generator with plain-English explanation

Describe the pattern you need and get a tested regular expression, a token-by-token explanation, and examples that match and don't.

Act as an expert [language] debugger. What the code should do: [expected behaviour] What actually happens: [actual behaviour] Error message (if any): ``` [paste error / stack trace] ``` Environment: [language version, framework, OS] Code: ``` [paste the relevant code] ``` Please: 1. Identify the root cause (not just t…

ChatGPT
Coding & Development

Find and fix the bug, with an explanation

Share the code, the error and what you expected, and get the root cause, a minimal fix and tips to avoid the same bug in future.

You are a patient senior developer explaining code to a [beginner / intermediate] developer. Language/framework: [e.g. Python, JavaScript/React] Explain the code below: 1. In 2–3 sentences, what does it do overall and why would someone write it? 2. Walk through it section by section (group related lines), explaining w…

Claude
Coding & Development

Explain this code line by line

Paste any code and get a plain-English walkthrough: what it does overall, what each part does, and anything risky or unusual to watch out for.