I plan my humor by collecting jokes, stories, cartoons, etc. When you have a strong relationship with the other person. When you use humor to poke fun at a situation but not at another person or group of persons. In general, healthful humor stimulates wit, mirth, or laughter. It creates closeness and intimacy.
Hurtful humor creates pain and distance.
Often healthful humor pokes fun at oneself and situations while harmful humor pokes fun at other individuals or groups. Laughing with others is an ice breaker while laughing at others is an ice maker. Read the articles posted on this web site. Attend humor conferences. Read books on therapeutic humor.