advanced
Legacy Code Refactoring Strategy
Analyze legacy code to propose a modern refactoring strategy.
📝 Prompt Content
Analyze the following snippet of legacy code. Identify potential bugs, security vulnerabilities, and areas where cyclomatic complexity is too high. Propose a step-by-step refactoring strategy to modernize the codebase while maintaining backward compatibility. Explain the trade-offs of each suggested change, specifically focusing on performance versus maintainability.