Ask HN: What tone to use in code review suggestions?
Review: a formal assessment or examination of something with the possibility or intention of instituting change if necessary.None of your examples provide feedback as to why you want a change. That may be why you have been led to ask this question.Consider:* There is a potential overflow in this code. The library function xyz already does this and can log when the app is in debugging mode.* This portion duplicates the same set of processes as over there. Refactor these into a single function, and we'll be good to go.* While I don't have feedback yet on this function, it's too long for me to follow. It would be easier to read and for future maintenance if you refactor this part into a function.* Since we're in closedown we can only take certain types of changes. If you refactor this into a separate function in the library, this change can be accepted.* Or, I hate to be the process person, but the internal guidelines for this team call for all code to be structured the same way. Refactor this part into a separate function and I'll approve the PR.There are lots of ways to provide feedback. I suggest stating the problem with the code and providing a solution. If that's the only possible solution to get past your review, state and don't ask. You can also give a carrot with "do this and I'll approve the merge."How would you speak when sitting next to the person face-to-face? What tone do you want your boss to use when providing a performance review during a 1on1?