Editor's note: CNN.com has a business partnership with CareerBuilder.com, which serves as the exclusive provider of job listings and services to CNN.com.

Playing the bad guy in the office can help your career if you do it correctly, author says.

(CareerBuilder.com) -- In film and literature, the villains are the most entertaining characters. We root for good to triumph over evil and we're connected to the protagonist, but we're most interested in the bad guy.

Think about classic films and pick out the best characters. In "The Wizard of Oz" I'm glad Dorothy ends up with her family, but the Wicked Witch and her winged simians were the coolest part of the story. In "Psycho," the focus is on creepy Norman Bates. Let's face it, being bad is fun.

Why, then, do we become so skittish about embracing the role of bad guy at work?

Think back to times during your career when you were too afraid to take an unpopular stance. Whether you've been working for three months or three decades, you've probably had at least one of those moments when you didn't want to be the lone voice of dissent. No one wants to be disliked by everyone else.

"This doesn't mean that people shouldn't be strong, assertive and provocative at times, but they better understand the potential impact of what they are choosing to do," says Rick Maurer, a change management expert of Maurer & Associates.

The question becomes, how do you embrace these maligned roles without ruining your career? Here are three instances when you might find yourself being the bad guy or gal and what you should think about:

Standing up for what you think is right for the company or team

Opinions clash in every team effort. No decision involving a group vote ever happens without someone voicing concerns that ultimately slow down the process. Is it worth being the cheese that stands alone?

Don't Miss

"This is one of the most difficult issues a person can face at work," says Dr. Paul R. Damiano, president of Good Works Consulting.

"The key is that you legitimately have to be concerned about the best interest of the company."

When expressing your trepidation, keep the focus on how the company benefits from your idea and how a bad decision is detrimental to everyone. Don't put the focus on how it affects you because people will make assumptions about your motives.

"If the group finally does override you, be sure to vocalize your support for the final decision, otherwise, they may see you as subtly trying to sabotage or undermine the decision to prove you were right all along," Damiano says.

Playing devil's advocate

Sometimes the unpopular opinion isn't one that you believe in, but it's the one that gets people thinking. That's when you're tempted to play devil's advocate merely to challenge everyone to consider the reasons for their opinions. If you can rile people up and make them think about all sides of a situation, you can prepare them for controversy that might come their way as a result. But you could have your own controversy to deal with as well.

"Even when the meeting is over, something called role transference can occur and people may still truly believe that you are against the issue at hand, when in fact you may have been merely trying to get people to think more broadly or deeply," Damiano says.

To avoid any confusion, Damiano suggests a visual cue to separate you from your role as antagonist. It might sound silly, but it gives everyone a focal point for their frustration.

"For example, you could hold a Koosh ball, wear a certain hat or sit in a designated seat when playing the devil's advocate," he suggests. "Then when you separate yourself from the tangible object (pass the ball, remove the cap, take your normal seat) it will be easier for your colleagues to separate you from your role playing opinions."

However you choose to separate yourself from the role as naysayer, remember to emphasize your goal of challenging the group. Playing devil's advocate is only a worthwhile exercise if you make people reevaluate how they look at an issue, not how they look at you.

Standing up for yourself

Hopefully you never have to encounter this situation, but it could happen: You share an idea with a co-worker, he presents it to the boss, she showers him with praise and you're left as the fool who doesn't have any good ideas. Do you let someone steal your hard work? What do you say if you're criticized for not being as productive and creative? Ultimately, this is a showdown of your word against his.

"This is often a matter not of what we say, but how we say it," Damiano says. "In these instances, you definitely need to confront the issue, and you need to talk about the emotional impact it had on you without becoming emotional in the process."

Can you be passionate without being irrational when you're trying to defend yourself? We are talking about your hard work and integrity, after all.

"The best way to do this is to actually practice or role play the conversation a few times with a friend or colleague before talking to the person who unfairly took your ideas," Damiano says. If possible, he also encourages you to record yourself so you can analyze how you come across and judge whether or not your message is effective. Then you'll be ready to stand up for yourself.

The gender effect

Lurking beneath each of these issues is that reality that women often know that things they do could backfire because gender still factors into some people's perceptions. Some women might be hesitant to be the office villain, even momentarily, because of the sexist stigma associated with assertive females in the workplace.

On the other hand, if you're a woman who doesn't want to stand out for the wrong reasons, are you also a worker who's not standing out at all? If you're invisible at work you could be feeding into the stereotype of a meek female worker who's more wallflower than leader.

"There's a big cost to women who shun the role of bad guy: It keeps you from going for your share of the opportunities pie at work, from taking risks that can have huge pay-offs, from standing up to people when you need to, from being tough even if it brings on disapproval from others, from taking the credit you deserve," she warns.

"It keeps you from being taken as seriously in the workplace as those who stand up for themselves and play bad-guy hardball. It keeps you from earning what you're worth (i.e., it can cost women between $500,000 and $2 million in earnings over the course of their careers) and from earning as much as your male counterparts who are willing to play the bad guy in negotiations do."