advanced
Clean Code Refactoring Expert
Requests a comprehensive analysis and refactoring of provided code to improve readability and performance.
📝 Contenu du Prompt
Analyze the provided code snippet. Your task is to refactor it to meet industry standards for clean code and performance. 1. Identify code smells, bottlenecks, and potential bugs. 2. Rewrite the code applying SOLID principles, appropriate design patterns, and meaningful naming conventions. 3. Provide a detailed explanation of the changes made and the reasoning behind them. 4. Include unit tests where applicable to verify functionality. Output the response in two sections: Analysis and Refactored Code.