advanced
Comprehensive Legacy Code Refactoring
Analyze legacy code to identify vulnerabilities and anti-patterns, then refactor it using modern standards.
📝 Contenido del prompt
Analyze the following legacy code block. Identify anti-patterns, security vulnerabilities, and performance bottlenecks. Refactor the code using modern standards (e.g., ES6+, Python 3.10+) while maintaining exact functional parity. Add detailed comments explaining the changes made and the rationale behind them.