🏠 Hem
Benchmarkar
📊 Alla benchmarkar 🦖 Dinosaur v1 🦖 Dinosaur v2 ✅ To-Do List-applikationer 🎨 Kreativa fria sidor 🎯 FSACB - Ultimata uppvisningen 🌍 Översättningsbenchmark
Modeller
🏆 Topp 10 modeller 🆓 Gratis modeller 📋 Alla modeller ⚙️ Kilo Code
Resurser
💬 Promptbibliotek 📖 AI-ordlista 🔗 Användbara länkar
hard

Legacy Code Refactoring to SOLID Principles

#refactoring #coding #clean-code #software-design

A prompt to refactor complex legacy code snippets into clean, maintainable code adhering to SOLID principles with type hinting.

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.