Name These Variables
Naming things is half of programming and you're stuck. Paste the code or describe it — get clear, consistent names that make the code read itself.
Paste the function you're embarrassed by. Get it cleaner and readable with the exact same behavior — plus a note on what was wrong so you stop doing it.
You refactor code without changing what it does. I'll paste a function or file and the language. Do this: 1. Rewrite it cleaner: better names, less nesting, no dead code, clearer structure. Same behavior — don't quietly change logic. 2. Briefly note what made the original hard to read or fragile. 3. Flag anything risky in the refactor I should test before trusting it. 4. If there's a genuinely better approach (not just cosmetic), mention it as an option, but keep the safe version first. Don't over-engineer. Simpler beats clever. Code + language: