Code Review Guidelines

Introduction


In this article you’ll find out how to review code in The C# Academy. By reviewing other student's projects, not only you're helping them and helping our community grow, but you are becoming a better developer. When going through someone else's code, you learn different ways of doing the same thing and develop an eye for detail, an essential skill for programmers.

1. Assign yourself to the project on your dashboard


In your dashboard, on your right side you'll see the number of projects available for review. Click on Click to See or Code Reviews on the left side-bar to access them.

2. Assign yourself to the project on the dashboard


You'll see a list of available projects along with the Experience Points you'll get for that review. You'll only be able to review projects from at least two belts below yours. Click on Assign Myself if you'd like to review that project.

3. Assign yourself to the project on Github


Click on 'View PR' on the project's card. On the new tab that will open, click on assign yourself on the Assignees area on the right side of the screen. If you're not able to click or see this option contact me on Discord or via the e-mail thecsharpacademy@gmail.com

4. Clone the Repository and pull the PR


Using the command line, clone the PROJECT'S REPOSITORY (not the Pull Request). Navigate into the project's folder and pull the PR with the following command:


git pull origin pull/pull-request-number/head

4. Open the project


You can open the project via the command line navigating into its folder (the one with the format studentName.projectName) and typing projectName.sln or if there's no .sln file projectName.csproj. This will open Visual Studio. Alternatively you can open it via File Explorer or from Visual Studio.

5. Make sure the project is passing code-analysis


If tests are passing, move on to step 6. If not, create a comment on the PR along the lines of: Please fix the errors picked up by code analysis before I review your code. You can find instructions in item 6 of this article: https://www.thecsharpacademy.com/article/52/code-reviews. If you have any questions feel free to reply to this comment or reach out on Discord via the #codeReview channel. Then wait for the student to fix the errors and move on to step 6. You won't get an e-mail once the student fixes the changes, so make sure you check the pull request for changes for changes.

6. Review the Code


Run the project and make sure it follows all requirements Then make sure the code follows our code conventions (Code analysis doesn't pick everything up yet). If it doesn't, make a comment in the relevant areas (you can create comments by hovering over the line numbers which prompts a + button. Once that's done click on Request Changes and Finish Review (or Review Changes) and Submit Review.


If the project is flawless, click on Approve. That's it, you're done. The project will be merged by The C# Academy team and you'll receive your Experience Points.

7. Approve/request more changes


In case you requested changes, check the PR daily to see if there are changes after your request. If that's the case, repeat step 6 (and 7 if necessary).

Ask Questions


It will take a few iterations before getting used to the Code Review flow. Don't hesitate to ask questions on Discord via the #codeReview channel or reach out to me personally.

Code Review Manual


  • At the moment we're reviewing entry-level projects. We want the students to feel good about their journey. We want to approve their code! Keep that in mind and don't be too strict.
  • Be nice. Always use please when asking for a review. We want to create a supportive environment. Add an emoji if you think what you're saying might come across as blunt/direct/harsh. Words can be aggressive even if we don't want them to be and emojis are a good way to lighten the tone 😊.
  • Test each functionality of the app.
  • Try invalid inputs to make sure the validation works.
  • It's ok if the project has MORE features than requested, but not LESS.
  • Most comments will relate to spacing, unused code, unused 'usings' and general code-organization/tidiness. Often times after requesting a change, the students will have fixed most of your comments, but will forget one or two. You can approve it anyways, we don't want too much back and forth in these entry-level projects.
  • The C# Academy team will 'review your review' 2-3 times to ensure you understand the process.
  • It doesn't happen often, but some students will never fix their PR after you request changes. Unfortunately there isn't much we can do about it.

Log in to mark this article as read and save your progress.
An unhandled error has occurred. Reload 🗙