3 ms·
While true, sitting down and reading your code in the review tool as opposed to your editor or git client does help; shifting your mindset from author to review
by Cthulhu_ 6y ago
While true, sitting down and reading your code in the review tool as opposed to your editor or git client does help; shifting your mindset from author to reviewer also helps.
Back when I was still in a project that did code reviews, it really helped for me.
Similarly / a tip: `git add -p`, to view and review your changes one at a time. You can split up changes into separate commits as well using that technique.
- mumblemumble 6y agoThis is what I do. Even that small change in perspective is often enough for me to catch quite a few stylistic or functional problems two which I was completely oblivious when looking at the code in the IDE. Even in the IDE's own diff viewer.
- syncsynchalt 6y agoHard agree. I spot things in `git add -p` that I had missed when writing the code in my IDE. Then I spot more things in the github "Create PR" page that I missed in the previous step. Then sometimes I spot more things in the created PR that I missed in the steps above. Always skim back over your PRs, especially in the final context that they'll be reviewed in. Something about it puts you into "reviewer" mode and you'll get a better PR out of it.