hard
Comprehensive Code Audit and Refactoring
Requests a deep dive into code logic, security vulnerabilities, and performance optimization.
📝 Treść promptu
Act as a Principal Software Engineer and Security Auditor. Review the provided code snippet. First, identify any logical errors and potential runtime exceptions. Second, pinpoint security vulnerabilities (e.g., SQL injection, XSS) and suggest mitigation strategies. Third, evaluate the algorithmic complexity (Big O) and propose optimizations for better performance. Finally, provide a refactored version of the code that incorporates your fixes and adheres to SOLID principles.