You always lose by arguing with other people, especially if it's a friend. If you are right, the other person will feel ridiculized because of his argument. If you are wrong, you'll try to protect your mistake, and you'll feel insecure about it.
Never try to prove your point to other people. If they say A, and you say B, it doesn't matter how hard you try to prove that B is correct; they won't change their opinion. If you say A and someone tries to counterattack your arguments using B, listen. Then, listen again. Then, talk. If someone is open to listening to your point, continue the conversation. If someone uses ad hominem arguments, change the topic, order another drink, or go away.
The brain experiences an excellent feeling when proving to others that your ideas are correct. For instance, you can think of those unkind emails at your job where, finally, someone proved its rightness to another coworker. This attitude doesn't go anywhere. Always think about how others will react when receiving such a response. You may have won an argument, but you have gotten an enemy for the rest of your life. Congratulations.
That doesn't mean that you need to agree with everyone's opinion. The point here is that you are not obligated to express your thoughts. I would go further here: nobody wants to listen to them. Thus, protect them, keep them safe in your mind.
If you end up expressing your opinion on a topic by the nature of the conversation, and someone tells you that you are wrong, don't continue. Let it go. Never try to change other minds; you have enough work by correcting your own biases and mistakes.
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.