Our Gemara on Amud Beis lists practices that different Rabbis attributed as the cause of their longevity, among them Rabbi Zakkai:

Rabbi Zakkai was once asked by his disciples: In the merit of which virtue were you blessed with longevity? He said to them: In all my days, I never urinated within four cubits of a place that had been used for prayer. Nor did I ever call my fellow by a nickname. And I never neglected the mitzva of sanctifying the day of Shabbos over wine.

It is difficult to discern any pattern or relation to these three practices. I cannot come up with a coherent unifying theme. However one point is interesting. Rav Yehoshua Hartman in his commentary on the Maharal’s Nesiv HaTorah (18:2, note 14) observes that when each of these sages are asked about their practices that merited a long life, they answered uniformly with “Meyamai” “in all my days”. This means that the practice required consistency. Certain merits can only be achieved by persistent and steadfast commitment.

Another interesting point brought out from this teaching comes from Tosafos. Tosafos noted that Gemara Bava Metzia 58b says that calling someone a nick name warrants a terrible punishment in the Hereafter, so how could Rabbi Zakkai consider this to be merely a virtue? Tosafos answers, the Gemara in Bava Metzia is referring to a name that defames his family lineage. (Shulkhan Arukh CM 228:5 extends this prohibition to any humiliating name). Therefore, our Gemara is referring to calling someone a nickname, even if it has no derogatory implications.

We can understand this simply as a middas chassidus, an extra act of piety, as a precautionary measure just in case the name embarrasses the person, although it has no obvious denigration. If the nickname was “shorty”, that could be hurtful. On the other hand if the nickname was “swift” or “cucumber” because he was a quick person or sold vegetables in the marketplace, the name is benign or even complementary. Yet still, in case the person somehow still would be embarrassed by it is an extra pious act to abstain. 

The Gemara actually often uses nicknames for sages, many of them based on occupation, but sometimes with ironic humor. Presumably, the great Tanna, Shimon Ben Nanes (Mishna Bava Basra 10:8), which means son of a dwarf, must have been indeed very short. As the son of something tends to be smaller than the father . Or maybe he was very tall and he was called son of a dwarf with even more irony. Or Rabbi Akiva was known by some as Kereyach (Baldy), see Rashi (“Chutz”, Bechoros 58a). Indeed a common practice for centuries is to call the author by the name of his most notable work, such as the Chofetz Chaim or the Ketzos or the Shaagas Aryeh.

The psychological and social function of nicknames is to allow for distinction and identify, especially in cultures that preceded surnames. There could be five Yosef Ben Shimons in a town, but only one Yosef the Limp. Some researchers suggest that it also confers intimacy between a smaller group, like an insider's joke. That is why kids use them to create a club or group.

Perhaps there is a deeper reason that we shouldn’t call someone a nickname. No matter what the person feels or thinks it still is in some way a diminishment of the person. A name means so much and is linked to identity. Is it really ok to call someone by a different term than their name?

Midrash Tanchuma (Ha’azinu 7) tells us:

Always should a man check the names to call his son one that is fitting to be righteous - as sometimes the name causes good or causes bad, as we found by the Meraglim.

Sefer Hachasidim (254) similarly says that names are important and influence the child׳s fate for better or worse. Furthermore, the Arizal In Shaar Hagilgulim (23) says Hashem puts into the parents mouth the name that is appropriate for the child’s soul.

In any case, we have ample reason to consider the dignity conferred by calling a person by their true name.  Children often end up with diminutive names within the family, often with endearment.  Still given our tradition, we should consider if it is always taken well.