I'm 55, a programmer, and I've been out of work for two years. I've had plenty of interviews, but no job offers. Here's my take on all of this: I'm too old to be a programmer. I'll put my "management hat" on and tell you why:
1. I'm old. One 5 hour energy drink revvs up your basic 20 year old code monkey all day. I need a saline drip with caffeine in it all day to keep going.
2. I'm expensive. I have 30 years of experience in the 'biz and a masters degree in CS. I'm not cheap. You could hire two 25 year olds for what I'm asking.
3. (and what I consider to be my greatest failing in the corporate world) I've seen all the tricks. I've been exposed to every nasty little mindgame management has at it's disposal. And sometimes I have the bad manners to call people on it. This is called "having a bad attitude".
So when I compete against 20-somethings in the worst economy since 1929 (I hesitate to say the worst economy ever), I lose. I should have made the leap to management when I had the chance, not because I would have loved management (I would have had to manage assholes like me, after all ;), but because at 40 you have TWENTY YEARS LEFT. The years go by really, really fast. You should really start thinking about a soft place to land when you're 60 now, because if you aren't in line to be a VP or a Director you ain't gonna make it at this point.
The suggestion to "Follow Your Bliss" only works in an economy that's not run by sociopaths. Hell, it only works in a country that's not run by sociopaths. Strike one strike two. Tighten your belt, put as much money away as you can, and make sure you keep your health up. Because the era of "company loyalty" is over, COBRA for a family costs as much as your mortgage, and finding a new job is going to be a real challenge.
Other than that, have a nice day! :D