54 yo here. Although I have a bachelor's in EE, I have been developing software since the beginning of my career. I am not necessarily nostalgic but I sometimes ponder about the real time assembly I wrote for a Telex switch, or the CHILL code I wrote for a telephony switch. All of it pretty much gone, not being produced anymore. Or the Windows 2 GUI written in C, the multi tier apps in VB6 and Powerbuilder. They are gone too.
However having participated in these projects give me a lot of perspective, and I notice that nowadays I tend to write less and be more thoughtful. I see others here with similar experiences.
Now as for getting old, there is one thing I recommend: get old but never allow yourself to look decrepit. Be always clean, well dressed. Don't complain about your back hurting, or show off the medicines you take. No one likes to be around sickness or weakness, so pretend to be healthy and strong (or try to be, even better). I aim for this reaction - "that guy looks good for his age". This usually helps with ageism, at least in my experience.