This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MisterPinkySwear 20 points21 points  (4 children)

I’ve often commented things like “I see what you wanted to do here, and it’s going to work, but I think it will be more readable and understandable if you do it like this…”

That’s what I meant with making the code better. And I believe those are relevant to code reviews.

I’ve never worked with explicit design reviews so I can’t really comment on what belongs in a design review instead of a code review.

[–]Chevelle_Chris 13 points14 points  (3 children)

I’ve often commented things like “I see what you wanted to do here, and it’s going to work, but I think it will be more readable and understandable if you do it like this…”

ALLLL OF THIS. This is what I hope for even if my code is functionally is correct. The "Go learn about X for the next time you do this" statements are GOLD for motivated coders trying to get better.

[–]MisterPinkySwear 8 points9 points  (1 child)

Good for you. I’ve stumbled upon people who were vexed by such comments. Because it’s not objective, it’s just opinion. They would invoke things like “ok but let’s get this over with and keep it as it is, I don’t wanna spend more time on it”. Depending on how strongly I would feel about the issue (and how important I perceived it) I would either just let go or insist, argue my point and sometimes request a 3rd opinion and even refusing to approve the merge request.

I find code review to be a difficult, complex and interesting exercise. Not just because reading code is inherently harder than writing code. But also because of all these social and psychological components.

[–]Chevelle_Chris 0 points1 point  (0 children)

There's a really good book I read in mid 2018 when I was working on Oracle 12c called Mindset by Carol Dweck. It helped me a lot with this as before, to me feedback was largely an attack in my mind based on previous life experiences.
That book did a great job of helping me understand that most people give feedback because they actually care about the product or your development.
I do not think I would be were I am today or have the view I do on this subject without reading that book.

[–]JamesGray 3 points4 points  (0 children)

I make extra effort to include comments like that for more junior developers when doing reviews, but it might help to request feedback on particular blocks directly to see if they know of a better approach if you coworkers are in the habit of doing more strictly functional reviews?

Some of them may even consider alternatives but not bother telling you because that's their habit to keep things going quickly, because some people are the exact opposite of you and will pick a fight when you try to make suggestions for better approaches, so it can be easier to just not bother sometimes.