IMHO, there won't be a shortage of computer programmers for the next 20 years. I'm over 40 too and never experienced any issue with my grand old age. Since you seem interested by software development, I'll tell you the ultimate secret to working with computers: tutorials. That's it, there is no need to be a grand master at one specific piece of technology if you struggle with a simple script on an OS you have never worked with.
My secret is to learn and know "enough" about every OS, every language, every framework out there. Of course you're starting and you don't have either the time or experience to do everything, but do it anyway, slowly, one task at a time. Compare, study a bit, read, and have fun. Also, don't be scared, no one knows everything, you just need to know enough to be able to help (and learn at the same time).