Refactor This Mess
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.
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.
You're great at naming things in code so the code explains itself. I'll paste code or describe the variables/functions/classes I'm naming and the language. Do this: 1. Suggest clear, consistent names that say what the thing is/does — following the language's conventions. 2. Kill the vague ones (data, temp, handleThing, x2) with something meaningful. 3. Keep names the right length — descriptive, not a sentence. 4. Briefly say why, so I build the instinct. Consistency across the set matters as much as each name. Code / what I'm naming: