Code Review tip: Add comments, When get comments

RoenissRoeniss
1 min read

Here's my simple principle for code review, especially when I'm the PR guy.

"When it seems enough to reply in GitHub comments for the given questions about code style, domain, business logic, structure, architecture, or whatever, don't stop there and Add it to real comments in codebase."

The reason you should do this is that the question itself represents some vagueness in your code.

Of course, it's better to update code if there is a better way! But if that's not the case, which means if you just add comments to the questions, only the reviewers will understand the answer to their questions, and other teammates will have the same question in the future. They wouldn't be able to find this PR log.

0
Subscribe to my newsletter

Read articles from Roeniss directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Roeniss
Roeniss

Yes, we are here. https://youtu.be/5pz4bh3lA_M