🔮 GitHub co-founder & ex-CEO, Tom Preston-Werner, joins Pullflow as an investor!

Code Review Conundrum: Balance between Objectivity and Subjectivity | Pullflow Blog

Code Review Conundrum: Balance between Objectivity and Subjectivity

A journey beyond error-spotting. Explore the art of enhancing code quality, sharing knowledge, and fostering camaraderie. Embrace the human element, and witness the transformation of your codebase!
Hassan Raza
Hassan Raza - Tue Jun 06 2023
Code Review Conundrum: Balance between Objectivity and Subjectivity


  • Code reviews aren’t merely ‘spot the mistake’ sessions, they’re opportunities for enhancing overall code quality, knowledge sharing, and creating a sense of shared ownership. Think of it as a mini think-tank, not a nitpicking session.
  • Every developer has a unique voice and perspective, and that’s our superpower. Embrace the human element in your code reviews. Variety is the spice of code, after all.
  • Remember, we’re dissecting code, not people. Make your feedback clear, actionable, and balanced. Constructive criticism is an art, Picasso. Let’s master it.
  • It’s not a battle, it’s a collaboration. We need to ensure the technical robustness of our code (Objective) while keeping an eye on readability, maintainability, and scalability (Subjective). In code, as in life, balance is key.
  • Every code review session is a chance to learn something new. Embrace the curiosity, innovate, and grow. Developers are lifelong learners – it’s in our DNA.
  • Automation tools can make code reviews more efficient, but they can’t replace our insights and judgment. Use tools as your allies, not as your overlords.
  • Mistakes are not just OK, they’re great! They are opportunities for learning and growth. So, let’s change our perspective and make code reviews our playground for improvement.
  • Professionalism isn’t confined to code reviews. It permeates every aspect of software development. So, let’s wear our professionalism like a badge of honor and raise the bar for software quality.

A few years ago, I was working for a budding tech startup. We were chasing an opportunity of a lifetime, and we had stringent deadlines to meet to lay claim to our share of the prize.

My role was that of a technical project manager. I was responsible for ensuring the website was primed for launch, whereas my colleague, let’s call him Sam, handled the non-technical elements like dealing with the marketing and sales team. We were committed to working diligently, ensuring the smooth flow of the project.

However, as the D-day approached, I was surprised when Sam proposed to delay the launch by a week. The reason? The legal team hadn’t yet approved some critical forms. The incident triggered some profound questions in my mind. Why did Sam insist on respecting the professionalism of the legal team while often pressurizing the technical team? Was our professionalism somehow lesser in comparison?

It dawned on me that it was vital to assert our professionalism in the tech field. For this, we had to strike a balance between the subjective and objective aspects of our work, particularly in code reviews.

The Evolution of Code Reviews: More Than Just Bug Hunts

Code reviews have come a long way from being seen merely as a systematic method to weed out bugs and errors. In contemporary software development practices, they contribute to the overall quality and maintainability of the software, far beyond just ensuring it is error-free.

By assessing the software’s design and architecture, code reviews can help developers identify potential problems in advance. This proactive approach reduces technical debt and improves the software’s longevity. Code reviews also facilitate knowledge sharing, leading to collective ownership of the code and a more cohesive team.

Further, code reviews can assist in ensuring that the software adheres to its specified requirements and intended functionality. By checking if the code aligns with the product’s desired outcomes, code reviews bridge the gap between development and business needs.

The Human Aspect: Embracing Subjectivity in Code Reviews

While we, as software engineers, pride ourselves on our logical and analytical thinking, it’s crucial to acknowledge the inherent subjectivity in code reviews. The uniqueness of individual developers is manifested in the form of different perspectives, past experiences, and creative prowess, which can lead to ingenious solutions and improved user experiences.

A healthy dose of subjectivity encourages open discussions, fostering an environment of respect and inclusivity. By valuing the unique contributions of team members, we can promote diversity and cultivate a richer software development outcome.

Subjectivity in code reviews brings in more than just a varied set of perspectives. It enables developers to empathize with the user experience, guiding them to craft code that isn’t just efficient, but also user-friendly. It highlights the importance of usability, recognizing that good software must cater to its end-users effectively.

Collaborative Code Review Culture: Trust, Respect, and Constructive Feedback

Creating a collaborative code review culture isn’t a task that’s accomplished overnight. It requires trust and respect to be cultivated among team members, bolstered by effective communication and empathy. A team that trusts and respects one another can offer and accept constructive feedback without animosity, contributing to a healthy code review environment.

Constructive feedback is a cornerstone of this process. By focusing on the code rather than the coder, and offering actionable suggestions for improvement, the team can support each other’s growth. This fosters a space ripe for continuous learning and improvement. It also reinforces the understanding that the objective of the code review is not to criticize but to refine the code and elevate its quality.

Furthermore, the collaborative culture extends beyond just the development team. By involving stakeholders from other parts of the product lifecycle in code reviews, we can gain valuable insights and address potential issues before they balloon into significant problems.

Mastering the Art of Feedback: Taming the Double-Edged Sword

Providing feedback during code reviews is a delicate art. Constructive criticism is a necessary tool for improvement, but when not handled carefully, it can spiral into destructive negativity.

The key lies in focusing on the code and its improvement. The feedback should be about the code – not about the person who wrote it. This approach dissuades any personal attacks and fosters a healthy, respectful code review culture.

Moreover, the feedback needs to be clear, specific, and actionable. Generic comments like “This code could be better” do little to aid the developer. Instead, articulate the issue clearly and suggest potential ways to improve it.

Lastly, while it’s important to point out areas of improvement, do not forget to highlight what the developer did right. A balanced approach will not only make the developers more receptive to feedback but also encourage them to keep improving.

Balancing Code Review Criteria: Objective vs. Subjective Measures

The criteria for code review should strike the right balance between objective and subjective measures. Objective criteria include adherence to coding standards, optimization of performance, security practices, and so on. These aspects ensure the technical robustness of the code.

On the other hand, subjective criteria relate to code readability, maintainability, and scalability. These aspects, while more qualitative, significantly impact the long-term viability of the code. A balance between these two sets of criteria ensures a comprehensive evaluation of the codebase.

Iterative Improvement – Because Rome wasn’t built in a day

Each code review session should be treated as a learning opportunity. It allows developers to learn new techniques, understand different areas of the project, and explore alternative approaches to problem-solving. By fostering a culture of curiosity and self-improvement, code reviews can significantly contribute to professional growth.

Code Review Tools: Automation + Human Interaction

Well, let me tell you about my love-hate relationship with code review tools. Automation can be a developer’s best friend, right? Code review tools can swoop in, find those pesky syntax errors, check adherence to coding standards, and free us from these robotic tasks. The convenience and efficiency they bring to the table are undeniable.

However, these tools aren’t infallible. A misplaced comma might catch its attention, but what about a design flaw, or code readability issues? These tools don’t quite possess a developer’s intuition or understanding of the bigger picture. So, there’s a tug of war between the cold precision of automation and the human touch’s nuanced insight.

The real magic happens when we strike the right balance. We need code review tools to handle the “grunt work,” but we also need our developers’ keen eyes and wisdom to delve into the deeper aspects of the code. Tools can facilitate the process, but the true value of a code review lies in the collaborative human interaction.

Growth Mindset: Embracing Code Reviews as Opportunities

Developers with a growth mindset view code reviews as opportunities for learning and improvement. This shift in perspective, from criticism to growth, can drastically change how developers perceive and participate in code reviews.

By celebrating learnings from mistakes and providing a supportive environment for exploration, we can foster a growth mindset within our teams. This can significantly enhance the quality of code reviews and contribute to professional excellence.

Overcoming Challenges: Resistance, Time Constraints, and Fear

Code reviews may face resistance from team members due to various reasons – fear of criticism, time constraints, or a lack of understanding of the process’s value. These challenges can be overcome by establishing open communication, fostering a psychologically safe environment, and offering support and mentorship.

Clear communication about the benefits of code reviews, such as improved code quality, knowledge sharing, and reduced debugging time, can help alleviate resistance. Additionally, providing adequate time and resources for code reviews can ensure they are not viewed as an additional burden but as an integral part of the development process.

Professionalism in Code Reviews and Beyond

While code reviews are a pivotal aspect of software development, professionalism extends beyond this process. It covers every facet of the software development lifecycle. By upholding high standards of integrity, transparency, collaboration, and continuous learning, software professionals can redefine their roles and contribute significantly to the creation of high-quality software.

Conclusion: Embracing the Code Review Revolution

In a world where software plays an increasingly dominant role in our lives, the value of code reviews cannot be understated. They are not merely checkpoints in the software development lifecycle but opportunities for growth, collaboration, and excellence.

While there is no one-size-fits-all approach to code reviews, striking a balance between the subjective and objective aspects can ensure a holistic and enriching process. By cultivating a culture of respect, learning, and collaboration, we can empower developers, foster a sense of ownership, and raise the bar for software quality.

So, let’s embark on this journey of mastering code reviews – not just as a task, but as an integral aspect of our professionalism, creativity, and commitment to quality. The path may be challenging, but the rewards are immense – improved software quality, stronger teams, and personal growth. And isn’t that what software development is all about?

Experience the most delightful
code review workflow