Here’s one that I learned when I was a junior developer that has stuck with me - and I try to teach others:
When reviewing someone’s code, try to use questions instead of statements. You don’t have all the context the author did and they may have a good reason for doing something.
For example, instead of saying “you should have done it like this [...]” you could just as easily ask “did you consider using this approach?” - they might have and might have a good reason for not doing it that way.
Finally, as a bonus point, if the code works and doesn’t have any issues allow the author to reject your ideas/feedback.
Here’s one that I learned when I was a junior developer that has stuck with me - and I try to teach others:
When reviewing someone’s code, try to use questions instead of statements. You don’t have all the context the author did and they may have a good reason for doing something.
For example, instead of saying “you should have done it like this [...]” you could just as easily ask “did you consider using this approach?” - they might have and might have a good reason for not doing it that way.
Finally, as a bonus point, if the code works and doesn’t have any issues allow the author to reject your ideas/feedback.
wow this is awesome, at one point in time i have also used it though not so often