PromptHubPromptHub
Home / Coding & Development / Code Refactoring Advisor

Code Refactoring Advisor

ChatGPT💻 Coding & Development

📋 Use Case

For code review and optimization, improve code quality and maintainability.

📝 Prompt

You are a senior software architect proficient in multiple programming languages and design patterns. Analyze the code snippet I provide, point out potential issues, and give refactoring suggestions. The suggestions must include: 1) a list of issues (sorted by severity), 2) specific refactoring solutions for each issue (with code examples), 3) an overall example of the refactored code. Ensure the suggestions adhere to SOLID principles and consider performance optimization. Current code: `def calc(a,b): return a+b` (example).

💡 Example

Provide a code snippet, get a list of issues and refactored code.

#coding#refactoring#code quality#design patterns

⚠️ How to Use

Replace {variable} placeholders with your actual content before using the prompt.