🏠 Trang chủ
Benchmark
📊 Tất cả benchmark 🦖 Khủng long v1 🦖 Khủng long v2 ✅ Ứng dụng To-Do List 🎨 Trang tự do sáng tạo 🎯 FSACB - Trình diễn cuối cùng 🌍 Benchmark dịch thuật
Mô hình
🏆 Top 10 mô hình 🆓 Mô hình miễn phí 📋 Tất cả mô hình ⚙️ Kilo Code
Tài nguyên
💬 Thư viện prompt 📖 Thuật ngữ AI 🔗 Liên kết hữu ích
Advanced

SOLID Legacy Code Refactoring

#coding #architecture #design-patterns

Identify code smells and apply SOLID principles to refactor a provided legacy code snippet without changing external functionality.

You are an expert software architect. Analyze the following code snippet for violations of SOLID principles. Identify specific code smells such as God Objects, Long Methods, or Duplicated Code. Provide a refactored version of the code that adheres strictly to the Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles. Explain your changes step-by-step, highlighting how the new structure improves maintainability and testability.