VIP 👤
🏠 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 🔌 API và bộ định tuyến AI
advanced

Legacy Code Modernization Strategy

#refactoring #design-patterns #code-optimization #architecture

Request a comprehensive refactoring plan for a provided legacy code snippet, focusing on design patterns and performance.

Act as a Senior Software Architect. I will provide a snippet of legacy code. Your task is to: 1) Identify code smells and violations of SOLID principles. 2) Propose a refactoring strategy using modern design patterns suitable for the language. 3) Provide the refactored code. 4) Write unit tests to verify that the external behavior remains unchanged while internal structure improves. Explain your architectural choices in depth.