Advanced
Strategic Legacy Code Refactoring
Direct the AI to act as a Senior Architect to analyze, identify bottlenecks, and refactor complex legacy code snippets while maintaining functional parity.
📝 প্রম্পট বিষয়বস্তু
Act as a Senior Software Architect with expertise in legacy modernization. I will provide a code snippet. Your task is to: 1. Perform a static analysis to identify code smells, performance bottlenecks, and violations of SOLID principles. 2. Calculate the cyclomatic complexity. 3. Propose a refactoring strategy that prioritizes maintainability and testability. 4. Provide the refactored code with inline comments explaining the rationale for every significant change. Ensure the refactored code adheres to the language's specific idioms.