News for hackers. Stuff that matters.
Re:How to Do Code Reviews by n4r9 on Friday January 24, 2020 @02:35PM (#22141670)
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 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.

There are no comments on this comment yet.