"Do not desecrate My holy name. I must be sanctified among the Israelites" (22:31). The role of the Jew is to sanctify the name of G-d. The Rambam after opening his monumental code of Jewish law with four chapters dealing with issues of metaphysics issues that are also pertinent to humanity at large begins the legal section of his code "the entire house of Israel is commanded on the sanctification of His great Name" (Fundamentals of Torah 5:1). Immediately thereafter the Rambam details the conditions under which one must forfeit one's life in order to sanctify and not desecrate the name of G-d. The act of desecrating the name is so severe that it is the only sin for which repentance is not possible in one's lifetime. Neither repentance, Yom Kippur nor suffering can fully atone for this most grievous of sins.
Of course man's actions can have no effect on G-d Himself and thus it is His name which we must sanctify. Our tradition places great emphasis on names, reflecting as they so often do, fundamental aspects of a person's life and character. The Talmud (Bava Metziah 58b) rules that in calling someone by a nickname they may lose their share in the world to come. While the Talmud states that this only applies if the name is derogatory the Rambam states no such qualification.
More than a name reflects our own personality it is how we relate to others. Avraham Avinu upon arriving in the land of Israel built an altar and "called in G-d's name" (Breisheet 12:8), a model followed by his descendants. The phrase Vayikra B'shem Hashem (and he called in G-d's name) is the constant refrain on Yom Kippur introducing the 13 attributes of G-d which describe His essence. Thus Kiddush Hashem and Chillul Hashem in truth reflect no more and no less than our relationship to G-d. If our behaviour is not one that others want to emulate then we are deficient in our relationship to G-d. And if, G-d forbid, our actions push others away from Torah we have shown that despite what else we may do we have no relationship to G-d.
Like many of the most fundamental of Jewish mitzvoth, Kiddush Hashem can not be defined in a narrow technical sense but reflects the image we portray vis a vis our Creator. And with the shifting norms of the world around us we must be ever cognizant that our portrayal is one that reflects well in the world in which we live. The Rambam includes in his definition that one's actions are such that "all will praise him, and they love him and yearn to emulate his actions; behold this has sanctified G-d's name". We do not have the luxury of only worrying about carrying out the Torah we must be concerned with how our actions are perceived by others even, nay, especially non-observant Jews and non-Jews. Perception is reality. Acts which are expressions of true Torah piety may, in the wrong time and place, actually run afoul of this exhortation. While few would study Torah aloud in the library one might wake a sleeping traveler with a noisy minyan at the back of the plane. While done inadvertently our Sages teach "Intentional or unintentional both are alike regarding desecration of the Name" ( Pirkei Avot 4:5). Conversely the Rambam rules that a Torah scholar who buys on credit is actually desecrating the Name something that today would be considered the norm and thus permissible.
Subjectivity plays a role vis a vis not just time and place but also personalities. The greater the person the greater the potential of Kiddush Hashem though the greater danger of causing a chillul Hahsem the greater dashed expectations have a much more deleterious impact. One should be careful in adopting stringencies which can not be maintained as their inconsistent application is liable to lead to religious ridicule.
Interestingly the notion of Kiddush Hashem and Chilul Hahsem are recorded as an "introduction" to the laws of Yom Tov . Yom Tov affords us with the opportunity and demands that we develop our relationship with our Creator. It is the time we are most "before G-d" - hence the obligation of going to the Temple on Pesach, Shavuot, and Sukkot. It is specifically as we grow spiritually that we must be concerned lest we inadvertently desecrate the name of G-d. The immediately preceding verses to this most important of principals discuss the korban toda , the thanksgiving offering. Remembering all those who helped as achieve what we have, including those who values we no longer identify with, is perhaps the best way to sanctify G-d's name. Our greatest gratitude must be towards G-d as all that we have achieved is a direct result of the talents that G-d has given us. May we use them wisely. Shabbat Shalom!