The pointy-haired boss is a manager who doesn’t program. So the surest way to avoid becoming him is to stay a programmer. What tempts programmers to become managers are companies with old-fashioned corporate structure, where the only way to advance in salary and prestige is to go into management. So if you want to avoid becoming a PHB, avoid such companies, and work for (or start) startups.
I never had to manage anyone in our startup, even though I was the president. The other hackers were my peers, and would have given me the raspberry if I’d tried to “manage” them. We operated by consensus. And the rest of the company reported to our experienced COO, who was also more of a peer.
Why be a manager when you could be a founder or early employee at a startup?
From Paul Graham’s Rarely-asked questions. I really like his answer here since it does underline a few facts about not making things yourself. Use your own hands to build things, even small ones, or just for yourself. Don’t try to stand on other people but rely on them. :)