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 “clean code”
4 prompts
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.
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…
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…
Coding challenge explained step by step
Understand algorithm problems: intuition, brute force, optimal approach, complexity and clean code.