|
|
|
|
|
by Grue3
2423 days ago
|
|
I follow the opposite rule. Never use a question unless you genuinely don't know the answer. For example the PR contains a bug, which was obviously not noticed by the submitter. The answer to "why did you do it this way?" is "I didn't think of all possible scenarios". The answer to "What would happen if blah happens?" is "Well shit, clearly everything will break!" . The answer to "Have you considered that foo might be null?" is "No I god damn haven't". By asking a question you're asking the submitter to publically admit their mistake (since not answering questions on a PR is rude) and apologize for something that all programmers do naturally (writing buggy code). Instead a proper comment is "This breaks if blah happens and foo is null" at which point the submitter just fixes the bug. It achieves a) by being a neutral statement, b) naturally by making the submitter rethink their assumptions without having to apologize for that and if the reviewer was in fact wrong and the comment is incorrect, c) would happen due to the submitter explaining why this situation can't happen (and possibly adding a code comment to that effect). |
|