(1) Take you star programmers for serious. Ask for their opinion - all the time. You might not agree to everything they say, but at least listen and give them some feedback. Gain new insights from their perspective - or especially if you happened to be a programmer once yourself - try two walk in their shoes again. And most of all: do your best to make them happy. You are in the software business. Those folks are by far your most valuable asset.
(2) Ignore you best peoples' objections. Fob them off with comments like "You don't see that from a management perspective" or simply "You are wrong". Make them feel like replaceable parts, e.g. by letting them know they could easily be substituted by any mediocre developer walking down the street. And once they decide to leave, blame them and forget about their dedication and achievements, from which your company has benefited.
So which alternative is chosen in most of today's corporations? You may have guessed it - number (2). More often than not it's the top notch people who care and try to improve their own and their coworkers' environment, try to point out where things simply go wrong-wrong-wrong. Yes, once they fail on this crusade, they might actually leave disenchantedly (frequently after a long, personal struggle) - after all those are the folks who won't have a problem finding a new opportunity somewhere else.
Once it's too late, management might finally ask what went wrong (or probably not). If you see one of your stars leaving the ship, it may be coincidence or just bad luck, but two or more mean that the sh.. hits the fan. How are you planning to be competitive with mostly not-so-gifted people and one or two morons? (If your organization has reached a certain size, expect to have at least some morons sitting around, those who slipped through your recruitment process. A high moron ratio is yet another way to frustrate your star programmers). If it's not the bottom 20% who quit, but the top 20%, then "something is rotten in the state of Denmark."
A somewhat deeper analysis regarding this topic can be found in one of my all-time favorite books, Tom DeMarco's / Timothy Lister's "Peopleware":
The final outcome of any effort is more a function of WHO does the work, not HOW the work is done. Yet modern management science pays almost no attention to hiring and keeping the right people.
We will attempt to undo the damage of this view, and replace it with an approach that encourages you to court success with this formula:
- Get the right people
- Make them happy so they don't want to leave
- Turn them loose
Why people leave:
- A just-passing-through mentality: Co-workers engender no feelings of long-term involvement in the job.
- A feeling of disposability: Management can only think of its workers as interchangeable parts.
- A sense of loyalty would be ludicrous: Who could be loyal to an organization that views its people as parts?