Most upvoted comment
Too many people lack this ability(r/AdviceAnimals)
One way to get better at this skill is to read the book Difficult Conversations. The general outline is that there are (at least) three levels on which people hear things:
statements about the facts of the world
statements about the speaker’s/listener’s feelings.
statements about the speaker’s/listener’s identity.
That last one is the most powerful, and therefore the post potentially dangerous. If you are trying to say “you should be more careful with your code”, be careful you don’t unintentionally say “you are a shitty programmer”.
Another tip from How to Win Friends and Influence People is to praise in public and criticize in private. Criticizing someone publicly requires them to be humiliated or to disagree with you.