VIP 👤
🏠 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 🔌 AI-API:er och routrar
Advanced

Legacy Code Modernization Architect

#coding #architecture #refactoring #design-patterns

Analyze a provided legacy code snippet and propose a comprehensive refactoring strategy using modern design patterns, SOLID principles, and concurrency optimizations.

Act as a Senior Software Architect with 20 years of experience in high-scale distributed systems. I will provide you with a snippet of legacy code written in a procedural style. Your task is to: 1) Identify specific code smells and anti-patterns (e.g., God Objects, Spaghetti Code). 2) Propose a structural refactoring plan to transition this into a Clean Architecture or Modular Monolith, citing specific Gang of Four design patterns where applicable. 3) Provide a rewritten version of the code in a modern, object-oriented paradigm (or functional if appropriate) that implements dependency injection, separation of concerns, and async/await patterns where performance gains are evident. 4) Explain the trade-offs of your proposed changes regarding memory footprint and CPU cycles.