Live data from Hacker News

How to Do Code Reviews

notion.so

1–10 of 17 posts

Re: How to Do Code Reviews

#2
The title of the article is "How to do code reviews" yet all the content is around why code reviews are done and what the goals are. And the content itself is pretty light - the second half is just rehashing the first half, which are all bullet points.

I'm curious how it made it to the front page and if some of the folks who thought it was useful could comment about how it helped them understand how to do a code review?

Re: How to Do Code Reviews

#4
post #2

The title of the article is "How to do code reviews" yet all the content is around why code reviews are done and what the goals are. And the content itself is pretty light - the second half is just rehashing the first half, which are all bullet points. I'm curious how it made it to the front page and if some of the folks who thought it was useful could comment about how it helped them understand how to do a code revi…

Agreed. I found the referenced article[0] far more useful as a guide for how rather than why.

[0](https://kickstarter.engineering/a-guide-to-mindful-communica...)

Re: How to Do Code Reviews

#5
post #2

The title of the article is "How to do code reviews" yet all the content is around why code reviews are done and what the goals are. And the content itself is pretty light - the second half is just rehashing the first half, which are all bullet points. I'm curious how it made it to the front page and if some of the folks who thought it was useful could comment about how it helped them understand how to do a code revi…

Agreed it was a pretty poor read, no matter how many emojis the author uses. The linked material is a bit better. [0]

[0] https://kickstarter.engineering/a-guide-to-mindful-communica...

Re: How to Do Code Reviews

#6
This is more of a list of "why" you do code reviews rather than how to do them. In my opinion the way to do code reviews is to be didactic. The point is not just to tell people that there are problems, but to explain why they are problems so that the developer can learn and avoid making similar problems in the future.

Re: How to Do Code Reviews

#7
Nice list but for me missing the most difficult pieces

- while giving a review, how to not focus on superficial details but instead really take the time to understand the problem and the solution. Making sure you can really understand why things were done the way they were and thinking about whether things could be made more clear, performant, follow best practices more closely, etc

- when receiving a review learning that people are reviewing it your code not you, learning how to look forward to reviews because they make your final product better

Would love to see advice on the really difficult bits of code review

Re: How to Do Code Reviews

#8
post #6

This is more of a list of "why" you do code reviews rather than how to do them. In my opinion the way to do code reviews is to be didactic. The point is not just to tell people that there are problems, but to explain why they are problems so that the developer can learn and avoid making similar problems in the future.

I try to have my team "teach not criticize" when it comes to code reviews. This helps shift the mindset from "what's wrong with this code" to "how can this code be better".

Its a subtle difference, but makes a difference in morale and code quality.

Post reply on HN