From the course: Inclusive Tech: Conducting Humane Code Reviews

Subjectivity

From the course: Inclusive Tech: Conducting Humane Code Reviews

Start my 1-month free trial

Subjectivity

- [Tutor] Have you ever received a comment like this on your code review? Or from the opposite perspective, have you ever left over 10 tiny comments on a colleague's code review pointing out indentation or formatting? If so, you have encountered the most common developer pain point when it comes to code reviews. And that's subjectivity. Because of the kinds of comments that start heated debates that make us sigh with despair and the kind of comments that make us dread code reviews the most. Why? Because these kinds of comments come from a place of personal preference, focus on the developer rather than the code, or don't have a single correct solution. Subjective comments are like this comment, seen in the materialized repo, an open source project. In the context of this poll requests, it can seem like a pretty straightforward and valid comment. It does look like the styles for the forum should be indented one level back. However, these kinds of subjective fixes shouldn't be happening during the code review process. We'll see why in a later video. Another subjective comment can also look like this. In this comment, the underlined sections show clear signs of personal preference and something called Premature Optimization. With no direct connections to any of the code review goals, this feedback feels superfluous and still there are even more ways that we write subjective comments without even thinking twice about it. Comments like, you should really indent lines 23 and 27 or replace var with const. Come on, it's 2020, or I'd rather use regexes here or still total number of users is better than total users. Getting frustrated yet. These are the kinds of subjective comments that make developers roll their eyes. And we don't want to leave eye-roll inducing comments. These only stray it from the important code review goals we should be paying attention to and erode our relationships with our teammates over time. Both things we should really avoid, to always remember, steer clear of subjective comments.

Contents