What is review?
- Git course
- Intermediate
- Lesson 57/82
- 4 min
Learn that code review is a quality control tool.
What is code review?
Code review is the process of having another developer examine code written by a developer. The goal is not only to find bugs but also to improve code quality, evaluate readability, and suggest improvements.
function calculateTotal(price, quantity) {
return price * quantity;
}On GitHub, reviews are usually performed through a Pull Request (PR). The reviewer evaluates the changes and provides feedback.
Why is feedback important?
Issues found during a review are communicated to the author as constructive feedback. A comment can explain why something is problematic and how it could be improved.
// Use a more descriptive name
function getUserAge(birthYear) {
return 2026 - birthYear;
}A good review evaluates the code rather than the person and focuses on constructive solutions.
Practice Create review information
Create a JavaScript object named review. Set the quality and feedback properties to true and the status property to "pending". Finally, print the status value using console.log.
Starter code
const review = {
// İnceleme özelliklerini ekle
};
// Durumu yazdırSample solution
const review = {
quality: true,
feedback: true,
status: "pending"
};
console.log(review.status);Expected output
pending
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 What is the primary purpose of code review?
- Delete all branches in the remote repository
- Completely clear the commit history
- Change the project's programming language
- Evaluate and improve code quality Correct answer
Explanation: Code review aims to improve code quality by identifying bugs and opportunities for improvement.
2 The review concept
const review = {
quality: true,
feedback: true,
type: "____"
};
const review = {
quality: true,
feedback: true,
type: "code_review"
};
Explanation: We identify the review type as code_review.
3 Review concepts
| Term | Meaning |
|---|---|
Code review |
Examining code |
Quality |
The standard of code |
Feedback |
Constructive feedback |
Reviewer |
The person reviewing |