3 ms·
Make observations but don't try to be an arbiter: Say "This function is long." but don't say "This function is too long." You can soften that language by using
by chmod775 4y ago
Make observations but don't try to be an arbiter: Say "This function is long." but don't say "This function is too long."
You can soften that language by using phrasing like: "This function has grown long."
Explaining how to resolve a problem if the solution is obvious can be perceived as rude. Avoid. Don't tell other programmers how they have to solve a problem either - it's their job to figure that out - make suggestions instead.
If you want to make a suggestion, explain how it addresses the problem and if possible put an emphasis on improving things for the sake of others: "Extracting this to a separate function would make it easier to grasp."
Brief, helpful, and you're not appearing like you want to hold anyone's hand or micromanage them.