I know I'm going against the normal view of things here, but as I near 50, I don't see any difficulty with people my age finding work. The group I work with would kill to find someone good with 30-40 years of experience. They are just really hard to find -- either they are already happy where they are, are a consultant, are a manager/executive, or they aren't very good.
The problem is this: If you have more than 20 years of experience and want to continue being a employee programmer you only have a few choices. You can advertise yourself as a senior programmer and try to command a senior salary. Or you can advertise yourself as a more junior programmer and ask for a low salary. If you have the ability to do the senior position, then there is not problem. If you do not... who the heck is going to hire someone with 20 years of experience who is still performing like a junior? Even if they are cheap, there is value to the employer of imagining that the employee will develop over time. Someone who flatlined 15 years ago is not someone you want on your team.
The moral of the story is: if you want to be a programmer for your whole career you need to stay on the front edge of the industry. You have to work your butt off day in and day out to not only stay current but always improve yourself. There will never be a day where you "make it". You will have to justify that senior position that you are going to occupy and show that you are better than the up and coming young wolves behind you. If you are not prepared to do that, then you are better off not being a programmer.