I’ve told that joke at parties many times and have always gotten a laugh. Tell it to a group of senior engineers who have heard it a hundred times, though, and you’ll get a polite, stony silence at best. Your ability to use humor can play a positive role in your career, but judgment is called for. Here are a few dos and don’ts.

Back in 1997, I met baseball legend Henry ”Hank” Aaron. He had arrived early for a meeting at my office. We were alone, and he seemed uncomfortable. Sensing this, I had the New York brashness to tease him about the recent World Series in which the Yankees beat his former team, the Braves. We had a good laugh. Use humor to break the ice.

In those days, one of my co-workers regularly fell asleep in the afternoon while reading. One day our supervisor beckoned us to Andy’s cubicle, where he gently placed a note on his reading material that said, ”We’re all watching you!” Andy woke up, saw the note, and looked around sheepishly. We were in hysterics. A bonding experience! Playful stunts can lighten the mood, so long as they don’t offend.

The safer strategy is to tell jokes about yourself and your own foibles. For example, in person, I can implicitly refer to my own appearance. I’m 5 feet 5 inches [1.65 meters] tall and bald. So when others complain they’re having ”a bad hair day,” I say, ”Every day is a bad hair day for me.” If a program is running late and the moderator asks me to be short, I say, ”I’m always short.” Develop your sense of self-deprecating humor.

Those jokes rely on my physical presence, where people can also see me smile. Humor frequently doesn’t convey itself in e-mail. The slightest sarcasm can come across as mean. Using emoticons, such as a :-) or a ”wink” ;-), can help. Ensure your messages are taken in the spirit you intended.