I am slowly learning the art of telling the difference. Got into an argument with a friend with something related to this and it helped me a lot to be more humble about my views, whether I'm right or wrong, because you can still hurt people regardless.
Discussion
That’s the thing right?
I ask myself “is this thing more important to me than the friendship?”
Most of the time the answer is no.
But every once in a while it isn’t.
Only in very dire circumstances would I sacrifice a friendship to be right in an argument. The vast majority of the time, the bond you form with close relations is infinitely more valuable to you as a human than intellectual smugness.