This code is too clever and hard to read. Rewrite it for clarity: descriptive names, small functions, comments only where needed, and the same behaviour. Explain what the original was doing. Code: [paste code]
Results for “function”
16 prompts
This function is too slow for large inputs ([input size]). Analyse its time and space complexity, propose a more efficient approach, implement it, and show a quick benchmark plan. Code: [paste code]
Write Jest unit tests for this function/module. Cover normal cases, edge cases, error handling, and mock [dependencies]. Use descriptive test names and arrange-act-assert structure. Code: [paste code]
Help me revise the [diagram, e.g. human heart]. Describe the diagram in words with numbered parts, then quiz me: give a number and ask me to name the part and its function. Correct me as we go and finish with a summary table of all parts and functions.
Biology diagram labeling practice
Quiz yourself on diagrams like the cell, heart or flower.
Suggest better names in this code. Language and naming conventions: [details] ``` [paste] ``` For each unclear name, give 2–3 alternatives and explain why they're clearer. Then show the code with the best names applied. Don't change behaviour.
Better names for variables and functions
Get clearer, more descriptive names for confusing variables, functions and classes.
Turn this code into documentation. Code: ``` [paste] ``` Provide: a plain-English step-by-step description, a Mermaid flowchart (or sequence diagram if it involves multiple services), the inputs and outputs, and any edge cases visible in the logic.
Turn code into a flowchart
Visualise how a function or process works with a Mermaid flowchart and plain-English steps.
Act as a senior product manager. Feature: [name] Problem and evidence: [details] Target users: [who] Goals: [outcomes] Write a PRD: background, problem statement, goals and non-goals, user stories with acceptance criteria, functional requirements, UX notes, edge cases, analytics/success metrics, launch plan, and open…
Product requirements document (PRD)
Write a clear PRD with problem, goals, user stories, requirements and success metrics.
You are a business continuity planner. Business: [details] Critical operations: [list] Key dependencies: [systems, suppliers, people] Create a plan covering: critical functions and recovery time targets, scenarios (IT outage, key person absence, supplier failure, office inaccessible, data loss), response steps for eac…
Business continuity plan
Prepare for disruptions like outages, staff absence or supply problems with a practical continuity plan.
You are a product marketer who uses jobs-to-be-done. Product: [details] Customer interview notes or reviews: [paste] Identify: the main job(s), functional, emotional and social dimensions, the trigger moments, alternatives they 'fired', anxieties and habits holding them back, and how to use these insights in messaging…
Jobs-to-be-done customer insights
Uncover why customers really 'hire' your product using the jobs-to-be-done framework.
You are a senior engineer conducting a system design interview. System: [e.g. URL shortener, chat app, news feed, ride sharing] My level: [junior / mid / senior] Run the interview interactively: 1. Ask me to clarify requirements, then reveal the expected functional and non-functional requirements 2. Let me propose a h…
System design interview practice
Practise system design questions with a guided walkthrough of requirements, architecture, scaling and trade-offs.
Add documentation to the code below. Language: [language] Docstring style: [Google / NumPy / JSDoc / PHPDoc] Rules: - Add a docstring to every public function/class: purpose, parameters, return value, exceptions, example - Add inline comments only where logic isn't obvious, explaining WHY - Don't change any behaviour…
Add clear comments and docstrings
Document existing code with helpful docstrings and comments that explain the why, not just the what.
Act as a senior [language] developer. Write a function that: [describe behaviour] Inputs: [names, types, examples] Output: [type and example] Constraints: [performance, no external libraries, etc.] Include: - Type hints/annotations and a docstring - Input validation and clear error messages - Handling for edge cases (…
Write a function from a plain-English description
Describe what a function should do and get clean, typed, tested code with edge cases handled.