News for hackers. Stuff that matters.
Re:How to do a code review by sanderjd on Thursday September 05, 2019 @10:03PM (#20892403)
Why the scare quotes around "positive"? I have lots of positive thoughts when doing code reviews. I don't write them into comments all that often, but sometimes I do. "Oh I didn't know about this API, nice find!" "Ah, nice approach, this is a big improvement." "Thanks for improving the test coverage!" Maybe this seems like unactionable "noise", but it isn't, it encourages future actions of the kind being positively reinforced. Plus it's free, it takes no time to write and no time to read comments like this, all it does is make the author's experience of reading the review a bit more pleasant. This is all upside, no downside. It would be crazy to discourage such a thing.
Re:How to do a code review by UK-Al05 on Friday September 06, 2019 @01:14AM (#20893258)
Depends how it's come across. If your not careful it can come across as patronising.
Re:How to do a code review by n_ on Friday September 06, 2019 @03:00AM (#20893634)
Full disclosure, I work at Google, and I actually find positive comments mostly rare, but code review culture is very different team to team, so I can hardly speak for the entire company.

Personally I try to make them often, but I also try to be thoughtful about making them as to not come off patronizing like you mentioned.

Though I’ve never felt like a positive comment ever made me feel patronized in any situation, I think a good way to not come off patronizing is to to make the comment more personal than general, ie:

“This is a cool way to use the rest operator (or whatever thing), Ima steal this”.

Obviously it needs to be an authentic comment, but I think it’s a significant difference vs

“Great use of the rest operator!”

When the interpretation on the other end might be “oh so this person is surprised I know these basic language constructs”.

I learn things from doing code reviews all the time, and I like letting my coworkers know that I feel like I’ve gotten better at my job as a result of reviewing their contributions.

I think it’d be a shame if I didn’t let them know.

Re:How to do a code review by afarrell on Friday September 06, 2019 @08:14AM (#20894931)
> it can come across as patronising

Sometimes, it is worth the risk of sounding patronising.

Re:How to do a code review by aledalgrande on Friday September 06, 2019 @12:06AM (#20892977)
Agree, I love to point out a nice approach or a TIL, and I like that Google put it down in writing. If Amazon really considers it noise, it is very descriptive of their culture.