For a worker down in the cube farm, it's easy to see the dysfunction of your own company, and to imagine that almost anyplace else would be better.

I don't have any data to back this up except my own personal experience, but I've worked at enough companies and seen enough others up close that I'm willing to go out on a limb here: All companies are dysfunctional. The thing is, they're all dysfunctional in different ways. This means that it's possible to pick an employer whose dysfunctions are ones that will bug you less. The key is to understand what it is that's really bugging you, and then to check for those particular dysfunctions at the new company.

The first part is easy to describe, although it may be hard to get the perspective to do a good job. All you need to do is:

Analyze the dysfunctional aspects of your work that bug you.

Think about them.

The "thinking" stage here is not about coming up with ways to fix things at your current employer--let's give you credit for having made those efforts long ago. The reason to think about them is to come up with questions to ask at a potential new company to see if they're dysfunctional in the ways that you've already learned are a problem for you. (You don't need to find out if they're dysfunctional in other ways: they are. But maybe they're dysfunctional in ways that, although they may bug other people, you'll be able to just shrug off as no big deal.)

If you're interviewing with people who will be your peers, you don't even have to be especially subtle. They don't want to have to work with some new-hire who turns grumpy and grouchy as soon as he or she starts, so if there's something that would make you grumpy or grouchy, ask about it. In the thinking stage above, you've come up with polite ways to get the information you want.

You don't need to ask, "Is the manager a insecure fool who cares more about face-time than actually getting the work done?" But you can ask, "What measures does the boss seem to use when evaluating performance." Your potential peers will very likely clue you in.

You don't need to ask, "Is the manager a psycho who yells at anyone who suggests that doing things differently might be better?" But you can ask, "Is process-improvement an important goal here?"

It's always good to toss out a few general questions that can elicit warnings. "Tell me about the culture here," is worth trying. Ask about how different departments work together. If there are multiple sites, ask about how they work together. Any general questions about how things are done give people a chance to warn you about the things that bug them, giving you the information you need to decide if those things will bug you.

If your only chance to interview is with the boss, it gets a little harder, but only a little. Your boss is no more interested in hiring someone who will be miserable there than your peers are. Find ways to ask the questions such that asking won't ruin your chances if the answer is what you're hoping it is. Neutral questions, such as "What are a couple of things you do to promote teamwork among your employees?" are usually safe. Even better are questions that give the boss a chance to praise their working environment. You'll find out what the boss thinks are plusses, without needing to mention things that might be minuses for you.

When a potential boss or coworker doesn't have a good answer, it's always possible that simply asking will shoot down your chances--but that isn't so bad if you'd just have been miserable at the new place anyway.

I've known too many people who have gone from job to job to job, always leaving because they were unhappy, but always finding themselves at a new job that also made them unhappy, simply because they didn't take the time to get clear in their head what it was about their job that made them unhappy and then check whether the new place would be better.