The art of code reviewing

Manojlakshan
4 min readJan 13, 2024

--

Hey folks! In this blog, I would like to share my experience with you regarding the code reviewing. I will take you on a journey through the challenges, lessons learned and nature of the reviewing code. So get ready, and let’s learn about the interesting world of code reviewing together!

In the world of coding, many people aim to enhance their computer projects. They explore a practice called peer code review, where they check each other’s work to improve it. This goes beyond fixing mistakes, it’s about learning together and getting better at coding. Making small, smart changes and following good rules helps create efficient and nice-looking code. Challenges may arise, but discussions and feedback become valuable tools for improvement. Code review ensures computer projects work well, aligning technical decisions with their intended goals. Celebrating good code becomes a fun part of the process, fostering a positive environment. And so, the coding journey continues, with each review contributing to ongoing learning and improvement.

What is code reviewing?

Imagine you are writing a story, and you ask a friend to read it before sharing it with others. In the code world, that’s what we call code reviewing. It’s like having a buddy checks your code to find any mistakes or make sure it’s written in well. This help us to catch errors early and ensures our code works smoothly. It’s bit like a teamwork, where developers help each other to create better and more reliable software.

What are the outcomes from code reviewing?

As I previously mentioned, code reviewing is like having a friend check your code before it is final. It helps to catch the mistakes early. Make sure the computer code works smoothly. Developers learn from each other during this process, sharing tips and making the code stronger. It also ensure that everyone follows the same code standers and best practices keeping things consistent. As a team, we collaborate and build a better understanding of each other’s work. Code reviewing isn’t just about finding mistakes. It is a chance to improve our skills and learn new tricks. By fixing issues early, we avoid making things more complicated later on. Moreover, It makes our code more reliable and establishes a culture of always getting better together.

How should we do a code reviews?

When we conduct a code review on GitHub or GitLab, we need to follow a few key steps to make sure the process works well. First off, Understanding the purpose and context of the changes. Reading extra notes or PR descriptions helps reviewers comprehend why the code is being modified, This makes the reviewing process easier. Once we get an idea of what’s changing, it’s helpful to break down the code into smaller pieces. It’s like looking at smaller parts of a big picture. it makes the checking process more focused and easier to manage.

It’s also important to make sure reviewing code follows the coding standers and best practices set by the community or organization. Checking things like method names, variable names, and class names helps us keep our projects organized, increase code readability and easy to maintain our project. Before we go further into code review, we want to see how we’re using the special features of the programming language. It’s a bit like making sure we use the right tools for a job to make our code smart and efficient.

Now, as we delve deeper into the implementation details, having gained a clear picture of why this pull request (PR) exists, let’s explore what has actually been done. Starting with a focus on unit tests, we ensure that the code and functions operate as expected. Simultaneously, we closely examine the logic and structure, confirming their alignment with the project’s goals. If you find it necessary to conduct your own testing, go ahead and fetch the code, inserting debug points for debugging purposes. This allows you to observe firsthand how the implementation functions. Following these steps, it’s time to provide feedback. Feel free to suggest improvements, optimizations, or alternative approaches to enhance the code further. Providing suggestions is like offering friendly advice to enhance the code. If you see ways to make it better or more efficient, don’t hesitate to share your thoughts.

By Questioning the business process, you can make sure the code fits well with the project’s goals. If something seems unclear or doesn’t quite match up, it’s totally okay to ask questions. Understanding the overall picture helps ensure the code plays its part in making the project successful. Don’t forget, complimenting good code is like giving a thumbs up for well-written and thoughtful contributions. It’s a way of saying, “Hey, great job!” This positive vibe encourages everyone in the team to keep doing awesome work. Recognizing good code creates a friendly and a happy environment filled with positive vibes within the team.

Conclusion

Code reviewing helps us create better projects. By reviewing each other’s work, we can fix mistakes early and learn together. Following the tips in this blog, like giving helpful feedback and praising good code, makes our coding teamwork even stronger. So, let’s keep reviewing and improving to create great software together!

Thank you for the reading, Join me on this tech adventure! Follow my profile to stay updated on the cool world of technology and innovation. Your support means a lot, and I can’t wait to share more exciting stuff with you. Let’s stay connected for more insights and fun discoveries ahead!

--

--