Nobody throws dollar bills in garbage !!
I am sorry for my harsh comment, but it is fact, all people who get fired are mostly the ones who are not useful to the company.
With old age, comes, old age problems, family issues, kids issues, health issues, and company cannot take care of everyone's problem. With all these around, it is difficult for old people to learn anything new !! world is changing and world is changing so fast, just in last decade, so many technologies became obsolete.
This being said, developers must focus on business over coding. Experience in business is more valuable then in coding because technology will fade away in couple of years. If you look at business, it remains same, technology is just means to communicate but business principles remain same.
I have seen developers ego like, "HTML is too lame, I cannot write HTML when I am experienced Java developer with Sun certification L1D2M5". This is what kills developer and this is what gets them fired.
This is applicable with all types of discrimination. I never see any discrimination, I just see it as lack of understanding.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.