Reading this thread, I get the sense that most comments are from twenty-something guys. There is no way they would understand what the 40-something rusty programmer is talking about. It's call the invincibility of naive youth. You will be him in a few years.
Ageism works against the young as well as the old. Most of these 20 something people I'd suspect, if they haven't been developers since they were 9, have run into it. The advice is still sound.
An employable skillset is now a moving target. You can't depend on job websites to get the job done. Your number one job is to be your own salesperson. Find someone who is where you want to be and find out how they got there, you're probably not that far off from being able to replicate their methods if you're already in the field.
Being hopeless and depressed about the issue doesn't solve anything, and if you're over 40 you have plenty of advantages. Become a consultant and sell yourself to companies who won't even give a 20 year old the time of day. They may not want to hire your outright, but they can definitely see they need your expertise.