Code review

A code review means checking the source code to fix bugs and improve the program, as well as improving the developer's skills. It's a way to find out how other developers see the code, what's unclear about it, and why some solutions are better than others.

Automatic Review

Auto-review is a special mechanism in the Hexlet's exercises and tests. It allows you to:

  • ask for help. If you can't solve the problem, сreate topic in the Discussion section, send a link to the review page, and ask the question
  • analyze the solution. Compare your solution to the teacher's and figure out how it works. Reset the exercise and repeat the teacher's solution from memory, especially if you have copied from it
  • save a solution. Go back to previously written code or share it with other students. To avoid revealing the solution ahead of time, the review page is only available to students who have already completed the exercise themselves
  • save alternative solutions. Try to solve the problem in different ways

Even if the code works, it can almost always be improved, and this is where other people's experience comes in handy. Hexlet support does not do code reviews for students, but you can ask your tutor for one if you are studying with a tutor.

How to save a solution on the site

  1. Run automatic tests
  2. The OUTPUT tab shows the test results
  3. Click the "Send for review" button. The system will save the solution, and the button will change to "Check out the review"

Auto Review page

There are several tabs on the page:

  • readme (task statement)
  • the student's solution and the teacher's solution, which is visible after successfully completing the exercise
  • tests and their outcome

Save multiple solutions to the same exercise and switch between them at the top of the page.

You can find a list of all your automatic reviews in your personal profile - "Learning" → "My code on review". There are also links to the review on the student's profile under the "Courses" tab. To see them, click on the arrow to the right of the course title.

Project code reviews

Projects are automatically tested. For students who are studying with a tutor, tutors do a code review in the site interface. They rely on clear criteria and help improve the project step by step. If the project did not pass the automatic review, the first thing the tutor will do is help you sort out the test failure errors, and teach you how to read and interpret them correctly.

At each iteration, tutors will suggest solutions and ways to cover the topic so that students aren't just writing code, but really understand what to do, how to do it, and why it should be done this way.