I'd say 40% of the time of my career I've been in a place where my ideas were valued and I felt like "part of the team" as a programmer, and later as a programmer/manager. Those places I stayed the longest. They make up 15% of the number of companies I've worked for (my résumé has a lot of places on it..ha!).
The rest of the places I was beaten down, much like the programmer in this story. Unlike that developer, though, as soon as I started to feel like the only skill I was valued for was raw programming I started looking for another job.
Good leadership is so hard to find!