at the other end of the spectrum, there are the rockstar programmers who pretty much never have this kind of problem. they are always sought after, they can pretty much name their own game. they don't have to deal with lousy employers for one second, because there's always somebody offering them something better.
i'm not one of those guys. but i'm aiming to get good enough at the game that i don't always dislike my job, at least.
i'm of the opinion that there are really good A-level programmers, competent but not terribly imaginative B-level programmers, and so on.
those companies i'm calling "lousy" were populated by low B and high C level people. management comes to expect certain things from these types. you have to be at the office eight hours a day, no goofing off, you have to be managed pretty heavily or you won't get anything done, etc.
if you're the low B or high C type of programmer, you could be very happy at that kind of company. so yes, there were a bunch of my coworkers that were satisfied.
personally, i rate myself as a high B. i work best with minimal supervision. if the higher-ups get out of my way, i can do an enormous amount of work in a very short time. i can solve most problems on my own that nobody imagined would occur, without even bothering anybody with the details, most of the time.
i do a lot of what looks like goofing off, which makes low-B-level higher-ups uneasy. my desire to work independently and get things done quickly often runs afoul of the culture, which decrees that your boss gives you thing A to do, you do thing A and ONLY thing A, report that you've done it, commence twiddling your thumbs, the boss gives you thing B to do, and so on.
so companies i'm calling "lousy" are really just a poor fit for me. and they don't get nearly as much done, and they're liable to be working on boring problems.
Technical ability is important, but so is being sociable and getting along with your peers. In fact, being sociable can often bond teams and elevate everybody's performance just through their willingness to work together.
An extreme example of a "lousy" team player: I know a very smart teen, who recently emigrated from Europe, who's got more raw programming talent than I've ever seen in anyone. He's currently working for a friend's startup, and he comes in after-hours to do his programming.
It's a small team, two or three programmers inclusive, and the other programmers are no slouches. However, he doesn't take direction, rarely interacts with fellow programmers and has no concept of business requirements. Experience will educate him with some of the business requirements (e.g., code reuse as opposed to writing from scratch), but if he doesn't think it's important, he simply won't play ball.
You can't build a solid team with that kind of personality.
Clearly, you're not so neurotic that you need to come in after-hours to code, but the tendencies are within most able programmers. Instead of locking yourself away, use your downtime to observe and educate your fellow programmers (and encourage them to do the same). No matter how able you think they are, they'll teach you something of worth.
Many very good hackers mirror such statements. It's not always a matter of wanting to do something 'your way', often times, a hacker will bristle at management because he or she genuinely thinks (and has good reason) that it's to the company's benefit.
At some point in a hacker's career, no matter how smart they are, they're going to be wrong about something. They will respond one of two ways: they will retract into their shell and fortify their position, or instead, poke their head out and learn how someone on the outside formed their opinion.
Curiosity begets discussion begets socialisation. Hackers are touted to be curious by nature, and I wouldn't imagine that curiosity excludes human beings. We are, after all, the strangest contraptions we're ever likely to encounter. If a hacker's reasonable conclusion is rejected, then isn't the better response to open a dialogue as opposed to assuming that your rejector knows no better?
The hacker needn't have been rejected by management either. If the hacker disallows a fellow hacker the opportunity to understand and challenge their perceived authority through deliberate interference, how can they claim to be a hacker? They're applying the same management practices they claim to detest to achieve superiority.
In the end, it comes down to having a curious mind and an open ear. If you don't have these traits, you can't seriously consider yourself to be a good hacker - or a good manager.
i guess we're all somewhere along the cubicle-worker-bee/cowboy spectrum. i'm closer to the cowboy end. as is anybody serious about being involved in a startup, i think.