What guidelines should I follow when given the task of reviewing code, and making…
- User
What guidelines should I follow when given the task of reviewing code, and making necessary optimisations
- Assistant
Code review guidelines are typically tailored to the specific requirements of a project, taking into consideration the balance between code quality and project deadlines.
But generally, you are expected when reviewing code to:
- Identify and report bugs
- Improving code quality
Bugs can be incorrect logic, spec misunderstanding. Missing edges cases are quite frequent. Code review is expected to improve code quality since it gives another perspective on a piece of code. It's the opportunity to make sure that the code is
- maintenable, easy to understand for others, consistent with the overall project.
- efficient, fast and lightweight on resource usage.
Bad reviews tend to focus on style rather than substance. Generally priority should be given to:
- making sure that the code works
- that the specification requirements are met
- that edge cases are properly handled
- then improving code quality and performance
- User
How should I know the edge cases? It's not my project...
Is it not enough to just see that whatever is written adheres to the standards we use in the company? And leave the functionality/edge check to QA?
- Assistant
When reviewing code that is not your own, it is important to consider edge cases to identify potential issues. While adherence to company standards and best practices is important, it may not be sufficient to ensure correct functioning in all scenarios. Basic analysis can identify potential edge cases, and collaboration with the QA team and developers can help further address any issues that arise.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)