Cleaning up old code manually takes days. AI refactors to modern patterns while preserving logic.
The Prompt:
Refactor this legacy code to modern best practices: [Paste old code] Target language version: [e.g., C# 11, ES2023] Apply: 1. Modern syntax (async/await, arrow functions, etc.) 2. Design patterns where appropriate 3. Better naming conventions 4. Remove code smells 5. Add error handling 6. Improve readability Explain each major change and why it's better. Preserve all original functionality.
Example: Callback hell → async/await, var → let/const, repetitive code → DRY functions
Learn modern patterns while cleaning code!

