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…
How to Do Code Reviews
11–17 of 17 posts
Re: How to Do Code Reviews
#12The 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…
To give a pretty trivial example of syntax sugar, if someone has written in C#:
var maxHeight = buildings.Select(b => b.Height).Max();
then I might point out that you can shorten it to var maxHeight = buildings.Max(b => b.Height);
whilst keeping it just as readable. Well, more readable because you need to read less characters to easily understand it. It seems pretty nitpicky but it's the kind of thing I'm delighted to be shown myself.Re: How to Do Code Reviews
#13Re: How to Do Code Reviews
#14Imagine you are at a unicorn with physical product already operating in public, and a C laughs at a suggestion of code review and says its too long, hard and expensive. What would you do?
Re: How to Do Code Reviews
#15The 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…
I agree and even then I think it misses some major goals of code reviews. For example, encouraging thinking about good coding style (as opposed to just "standards"), making use of the language's syntax sugar where it makes things more readable, and the underlying performance. To give a pretty trivial example of syntax sugar, if someone has written in C#: var maxHeight = buildings.Select(b => b.Height).Max(); then I m…
Re: How to Do Code Reviews
#16This one on the human/how: https://dev.to/solidi/be-a-rockstar-at-pull-requests-1e4f
Re: How to Do Code Reviews
#17The 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…
One of the (unspoken?) tenets of XP is that if you can't have code reviews, break your code into small enough bits that you are comfortable defending each decision individually (rather than rafting them up and trying to get through 10 lines of gold and 20 lines of crap). The blast radius is tiny, and you can't as easiely confuse yourself into thinking buggy code is fine.
So there was a time where "how to do code reviews" meant "how do you cause code reviews to occur", not "what processes should you incorporate into your reviews". Maybe OP is caught in a time warp.