You'll be fine.
I'm a few years ahead of you. I had the same fears. I was newly married and didn't feel like I was ahead of the game. I'm now 33 and have a house and two kids. It's a trip but I'm still a programmer somehow.
Companies come and go. They go on huge hiring sprees and then either go under or layoff people in a few years. Few, if any, will invest in you long-term or care about the stability of your family. So don't count on having a career path the resembles anything like what your parents or grandparents enjoyed.
"Retirement," doesn't seem like something on the menu for people in our generation or the ones to come.
So plan for it yourself. Education is your best, first defense. Study the right things (Maths should be the top of the list IMO). Next plan to save everything you can and spread it out into investments in a good balance of stocks and bonds. If you decide to have kids start an education fund right away and look into any grants or assistance you can get from your local government to kick-start it; if they do better than you in life then chances are your retirement will be fairly comfortable.
You can still stay sharp. You just have to change the yardstick. My young friends always talk about the latest languages or frameworks but it always comes back to data structures and transformations. I've just learned to be more picky about how I spend my time because once we started having kids I've had far less of it to waste.