What is a code review?
A code review is a development process to obtain peer feedback to identify bugs, share knowledge, and improve the quality and performance of a program.
Why are code reviews important?
Software engineers use code reviews to obtain feedback on their solutions and implementation. A reviewer looks for bugs, logic errors, and unique / odd / unlikely edge cases to help the developer improve the quality and performance of their program. Code reviews benefit the developer and the project:
- Fewer bugs. Code reviews decrease the number of bugs in a program before it reaches the user.
- Knowledge sharing. Software development teams learn from each other by reviewing each other's code.
- Code quality. Code reviews ensure the readability, efficiency, and maintainability of the program.
- Better performance. Code reviews help identify any performance issues in the program.
In the CSA curriculum, students use code reviews to strengthen their programming and collaboration skills. Students receive many opportunities throughout the curriculum to review each other's code and give meaningful feedback. Code reviews also help students understand best practices for writing and debugging code while developing several AP Computational Thinking Practices that are assessed on the AP CSA Exam.
How do I set up code review groups?
You will need to create code review groups before students can use this tool.
- From the Teacher Dashboard, find your CSA section row and select the number listed under the 'Students' column:
- Select Manage Code Review Groups.
- Turn on the Enable Code Review toggle. Note that the code review option will disable automatically after a period of time, and you will need to return to this page to turn it back on
- Once the toggle is turned on, you are ready to create your code review groups. These groups represent small teams of students that can request and give feedback on each other’s code. When a student requests feedback, only you and the members of their team will be able to respond. You can edit these groups at any time.
Click on the Create Group button. You have the option to give the group a name. Move students to the desired groups.
- Repeat this process for each section as needed.
To request feedback on their code from a group, students select the Start Code Review button in the Review tab:
This initiates a code review and adds the student’s name to the Review a classmate’s project… dropdown. Students are unable to edit their code while it is open for review. Once students are finished receiving feedback, they can select the Close Review button and resume editing their code: