Refactor code for readability
IT Developer
The prompt
Refactor this code for readability and maintainability.
{{paste_code}}
Language: {{describe}}
Context: {{what_this_code_does}}
Priorities (check all that apply):
- {{value}} Improve naming
- {{value_2}} Break up long functions
- {{value_3}} Remove duplication
- {{value_4}} Add comments
- {{value_5}} Improve error handling
Constraints: must not change external behaviour. {{other_constraints}}
Please:
1. Return the refactored code
2. List each change and why
3. Flag bigger architectural issues to address separately