I'm 48 and ended up moving up, even though I still love to code.
The reason wasn't age as much as it was simply a desire to do more complicated stuff. To me the real challenge in technology has always been at the intersection of business and tech, that spot where you have people with a need meeting people with capability. The business side alone is pretty boring, and the tech side at the end of the day just amounts to variations on bits and bytes. Puzzle books. (Although, like I said, I love it)
Being a consultant, I see a lot of older developers around. I think there's a significant bias in the industry towards younger guys -- mainly because younger guys are the hotshots moving through development into management, and people like hiring people that look like them. [Insert long discussion here about age bias if you must. I prefer to just acknowledge it and move on.]
The "mistakes" I've seen from older developers come in two flavors: not specializing enough and not moving around enough. Some guys will "float to the top", and become more of a surface-level generalist. This is the path I see my own technical skills leading. That's great, but many times companies specifically want some kind of bullshit new technology because somebody thought it looked hot on HN. In that case, you're at a disadvantage. And after a few years pass like that, sure, you're the guy that can do anything, but only in C. That has real, solid, useful business value -- but it sucks to try to sell in the labor marketplace. I have a feeling there are going to be a lot of older startup founders over the next 30 years that fit into this mold.
The second way to kill yourself is to stay at one company, working on one product and one technology, longer than a couple of years or so. Pretty soon you're the master of C++11 as it applies to real-time embedded weasel-hunting robots -- in other words, you are truly the master of something nobody else on the planet cares about. That works great until they stop making weasel-hunting robots, then it sucks.
I think the problem with age as a developer is the same problem you have at 22: you have to wisely balance the time and energy you spend on learning new things. You can't learn everything and move around every other month, but you can't stagnate either. Instead, you have to carefully watch the market and anticipate where it's going to be in 3-4 years. As you get older, sadly, it's just easy to stop giving a shit as much as you used to. Sure, in five years everybody will be using X, but what will they be doing with it? I'll tell you what. In 99% of cases, they'll be doing the same kinds of things they're doing right now, that's what. So after a couple of dozen rides on the "Gee whiz! Is this cool tech or what!" wagon, it gets tougher to get back on again.
Your example for the second way's it's own counterexample, IMO...
It seems to me that the skills needed to make a good weasel hunting robot (computer vision, mobility, audio processing) would have lots of other applications. Probably could angle to get hired for some of Google's robotic initiatives...
The reason wasn't age as much as it was simply a desire to do more complicated stuff. To me the real challenge in technology has always been at the intersection of business and tech, that spot where you have people with a need meeting people with capability. The business side alone is pretty boring, and the tech side at the end of the day just amounts to variations on bits and bytes. Puzzle books. (Although, like I said, I love it)
Being a consultant, I see a lot of older developers around. I think there's a significant bias in the industry towards younger guys -- mainly because younger guys are the hotshots moving through development into management, and people like hiring people that look like them. [Insert long discussion here about age bias if you must. I prefer to just acknowledge it and move on.]
The "mistakes" I've seen from older developers come in two flavors: not specializing enough and not moving around enough. Some guys will "float to the top", and become more of a surface-level generalist. This is the path I see my own technical skills leading. That's great, but many times companies specifically want some kind of bullshit new technology because somebody thought it looked hot on HN. In that case, you're at a disadvantage. And after a few years pass like that, sure, you're the guy that can do anything, but only in C. That has real, solid, useful business value -- but it sucks to try to sell in the labor marketplace. I have a feeling there are going to be a lot of older startup founders over the next 30 years that fit into this mold.
The second way to kill yourself is to stay at one company, working on one product and one technology, longer than a couple of years or so. Pretty soon you're the master of C++11 as it applies to real-time embedded weasel-hunting robots -- in other words, you are truly the master of something nobody else on the planet cares about. That works great until they stop making weasel-hunting robots, then it sucks.
I think the problem with age as a developer is the same problem you have at 22: you have to wisely balance the time and energy you spend on learning new things. You can't learn everything and move around every other month, but you can't stagnate either. Instead, you have to carefully watch the market and anticipate where it's going to be in 3-4 years. As you get older, sadly, it's just easy to stop giving a shit as much as you used to. Sure, in five years everybody will be using X, but what will they be doing with it? I'll tell you what. In 99% of cases, they'll be doing the same kinds of things they're doing right now, that's what. So after a couple of dozen rides on the "Gee whiz! Is this cool tech or what!" wagon, it gets tougher to get back on again.