Code Refactoring with Step-by-Step Explanation
20Sem avaliações ainda
Sobre este prompt
Who This Is For
Developers who want to improve existing code quality and learn the principles behind each refactoring decision — not just get a cleaner version.
What Problem It Solves
Blind refactoring often introduces subtle bugs or makes code harder to reason about. This prompt refactors toward a specific goal, preserves the original behavior, and explains each change so you understand the trade-offs.
Example Use Cases
- Refactoring a long function into smaller, testable units before adding new features
- Improving the performance of a slow database query loop
- Making a tightly coupled module more modular before a team handoff
What to Expect
The refactored code, a before/after comparison, a numbered explanation of each change, and a note on what was intentionally left unchanged and why.
Adquira este prompt para ver o template e preencher as variáveis.