You have a bad boss: a screamer, a boss who plays favorites, a die-hard narcissist. You spend an inordinate amount of time complaining about your boss to anyone who will listen. Everybody agrees: your boss is bad. But what does commiserating do for your job satisfaction and career goals?

Absolutely nothing.

You can’t change your boss and, chances are, you’re not in a position to change jobs. What you can change is how you perceive your boss and how you work your boss to your advantage.

Related: Bosses From Hell and What You Can Learn From Them

Aikido serves as a perfect analogy for how to accomplish this. Firstly, flow with your opponent’s movement. Figure out your boss’s secret fear and desire. Secondly, in contrast to boxing -- where your aim is to punch out your opponent -- redirect the movement to your benefit. Become valuable to your boss. Become an ally.

While every fiber of your being may resist this approach, remember that you’re supporting your boss’s success all in the name of your own success.  Here’s how.

1. Identify your boss’s secret fear and desire. Almost everything we do in life is determined by a) what we run from and b) what we run towards. Bosses are no exception. Those two things drive your boss’s behavior. Once you determine the fear your boss is running from and the desire she’s running toward, she becomes predictable and, therefore, ready to work for you.

For example, a Finger Pointer Boss manages by blaming. He fears that he lacks the skills to be successful but his heart’s desire is to be a 100 percent success.

An Egomaniacal Boss, on the other hand, believes she’s perfect and brilliant but her grandiose approach leaves a trail of unfinished projects. Her desire is to be loved but she fears she’s not lovable and dreads being out of control. Her bravado is a mere defense against mediocrity.

Once you have this insight, what should you do with it?

Related: Are You a 'Horrible Boss'?

Step 2: Make yourself valuable by being the boss’s ally. The entrée to making yourself valuable to your boss is to either fulfill his secret desire or keep him safe from his secret fear. You accomplish this by becoming an ally.

Your gut may ask why you should pander to your bad boss’ shortcomings. Serving as an ally is your most effective way to take back your power. You will gain leverage so you can ask for, and more likely get, what you want and need.

With the Finger Pointer Boss, you need to be the calm in the eye of the storm. By not reacting to his bluster in any way you show him that his bluster lacks power. Then shift to be his problem-solver. Take the responsibility to fix, one way or another, whatever problems arise. That will make your boss look like a success, allowing you to avert disasters rather than just doing damage control. As he discovers he can trust you to fix problems, you will become more important to him and to the company.

In the case of the Egomaniacal Boss, working her takes nerve, gumption and strategy. By flowing with her fierce need for loyalty and adoration, you become the go-to employee who buttresses her sense of control and helps turn her brilliant chaos into order. If you do it well enough, over time you will become her powerful,  trusted wing-(wo)man. When Egomaniacal Boss moves up (or out), she’ll want to take you with her.

An Aikido master doesn’t seek to demolish the opponent but to deflect potential harm and, in so doing, gain the advantage. Switch your focus from working yourself into a frenzy to working your boss for your own benefit. You’ll find the job satisfaction and career success that’s been eluding you.

Related: How Not to Be a 'Bosshole'