VIP 👤
🏠 Home
Benchmark Hub
📊 All Benchmarks 🦖 Dinosaur v1 🦖 Dinosaur v2 ✅ To-Do List Applications 🎨 Creative Free Pages 🎯 FSACB - Ultimate Showcase 🌍 Translation Benchmark
Models
🏆 Top 10 Models 🆓 Free Models 📋 All Models ⚙️ Kilo Code
Resources
💬 Prompts Library 📖 AI Glossary 🔗 Useful Links 🔌 API & Routers
Advanced

Strategic Legacy Code Refactoring

#coding #refactoring #architecture

Direct the AI to act as a Senior Architect to analyze, identify bottlenecks, and refactor complex legacy code snippets while maintaining functional parity.

Act as a Senior Software Architect with expertise in legacy modernization. I will provide a code snippet. Your task is to: 1. Perform a static analysis to identify code smells, performance bottlenecks, and violations of SOLID principles. 2. Calculate the cyclomatic complexity. 3. Propose a refactoring strategy that prioritizes maintainability and testability. 4. Provide the refactored code with inline comments explaining the rationale for every significant change. Ensure the refactored code adheres to the language's specific idioms.