Odds of Hanging On
While getting into software isn't a difficult proposition, many coders don't stay in this field for more than ten years. Why?
Well, first off, a lot of people find that they just don't enjoy coding professionally that much. They get bored with the work or they burn out and they move on to other careers that don't involve SQL or Ruby on Rails.
It's also easy to get left behind in coding because technology is constantly evolving. The coder who keeps up with the latest in software, who spots trends and takes the time to become knowledgeable about them, who picks up a new programming language on the fly because it looks like that language can move his or her career forward in the future—that's the coder who's still going to be a draw in a decade.
Coders who think a college degree should guarantee them a job for life and who don't take the time to keep their skills and knowledge up-to-date—well, those coders are screwed.
Second, many software companies simply aren't that stable. You've probably heard of at least one startup that was the coolest thing since sliced bread one day, and bankrupt the next. Even large tech firms that you think might be immune from downsizing aren't.
Finally, many coders use coding as a springboard to bigger, better things. As a veteran coder, maybe you decide to get out of writing software so you can make a name (and lots of money) for yourself as an SQL Server guru. Maybe you leave the coding to the n00bs and go into management instead. Or maybe you decide to head back to school for a master's degree or a doctorate, so you can teach or consult or found your own startup.