65 lines
1.6 KiB
Plaintext
65 lines
1.6 KiB
Plaintext
CREATING CODE
|
|
I need to implement [specific functionality] in [programming language].
|
|
Key requirements:
|
|
1. [Requirement 1]
|
|
2. [Requirement 2]
|
|
3. [Requirement 3]
|
|
Please consider:
|
|
- Error handling
|
|
- Edge cases
|
|
- Performance optimization
|
|
- Best practices for [language/framework]
|
|
Please do not unnecessarily remove any comments or code.
|
|
Generate the code with clear comments explaining the logic.
|
|
Include:
|
|
1. Constructor/initialization
|
|
2. Main methods with clear docstrings
|
|
3. Any necessary private helper methods
|
|
4. Proper encapsulation and adherence to OOP principles
|
|
|
|
|
|
|
|
|
|
|
|
REVIEWING CODE
|
|
Can you review and explain the following part of the code in detail:
|
|
[paste code section]
|
|
Specifically:
|
|
1. What is the purpose of this section?
|
|
2. How does it work step-by-step?
|
|
3. Are there any potential issues or limitations with this approach?
|
|
|
|
Consider:
|
|
1. Code quality and adherence to best practices
|
|
2. Potential bugs or edge cases
|
|
3. Performance optimizations
|
|
4. Readability and maintainability
|
|
5. Any security concerns
|
|
Suggest improvements and explain your reasoning for each suggestion.
|
|
|
|
Create a [class/module] for [specific functionality] in [programming language].
|
|
Include:
|
|
1. Constructor/initialization
|
|
2. Main methods with clear docstrings
|
|
3. Any necessary private helper methods
|
|
4. Proper encapsulation and adherence to OOP principles
|
|
|
|
|
|
|
|
|
|
|
|
REWRITE CODE
|
|
|
|
Can you review and rewrite the following code in detail:
|
|
|
|
Please consider:
|
|
- Error handling
|
|
- Edge cases
|
|
- Performance optimization
|
|
- Best practices
|
|
- Code quality and adherence to best practices
|
|
- Potential bugs or edge cases
|
|
- Performance optimizations
|
|
- Readability and maintainability
|
|
- Any security concerns
|