But when I look around, I hardly ever see web programmers over the age of 35, and it makes me wonder why.
Do some math. Programming for the web became a major career option around, say, 1997. It really wasn't mainstream at all before then. So you take a person like me who is 52. Well, by 1997, I had a PhD in a field totally unrelated to web dev. Strangely, I actually have spent a fair bit of time coding, but that's rare that someone with a PhD in another field would end up there. For me, there were things that getting on the web allowed me to do (live in a place I really wanted to live) that academia did not. But the vast majority of people I know stayed in the field they had chosen by 1997 (which was commonly not what they majored in in college because by 1997 we were 12 years out of college).
Now take the guy who is 30 right now. What career did he have in 1997 that would have required courage and retraining for him to leave and go into this new web thing?
Let's see... oh right, he had learned how to wear big boy pants and was figuring out that girls are much more interesting than he thought a couple of years ago. He was trying to decide between fireman and pro basketball player except that he was short and couldn't jump and had asthma, so those were both looking unlikely.... but what to do? What to do?
Four years later, he sort of realized there was a wizard behind that web curtain and that doctors and lawyers knew jack #*$! about what was behind the curtain, but a handful of wizards did and a short kid who has asthma and can't jump CAN be one of those wizards. Dading... now he's building websites.
So a crap ton of people who are 30 made that choice because it was a reasonable choice and it will still be a reasonable thing to do in 20 years if it's a reasonable thing for anyone (assuming algos haven't replaced them all, regardless of age).
For my generation the choice was not about finding a career, but changing careers. And why would a 55 year-old who's looking at retirement in a few years change careers unless he has a compelling need?
Even in the programming world, lots of "serious" programmers just didn't see most of what happened on the web as serious. And if they did, they were doing backend stuff still in languages like C++ and Java and guess what, most of those people are still gainfully employed, but they aren't necessarily programming for the web in Javascript because they know a half-dozen language in depth and of those, until quite recently Javascript programming paid the least and had the least interesting problems to solve and you had to wade through zillions of lines of crappy code by self-taught programmers.