hard
Legacy Code Refactoring to SOLID Principles
A prompt to refactor complex legacy code snippets into clean, maintainable code adhering to SOLID principles with type hinting.
📝 Contenu du Prompt
You are a Principal Software Engineer specializing in code modernization. Analyze the following legacy code snippet. Identify code smells, violations of SOLID principles, and potential performance bottlenecks. Refactor the code to improve readability, maintainability, and extensibility. Ensure the refactored code includes comprehensive type hinting, error handling, and docstrings. Provide a diff-style comparison explaining exactly why each change was made.