Interesting read. So here is what I've learned if you wanna keep on writing code and stay competitive:
* You'll be discriminated the older you get. Make yourself ready:
* Career and big names is important. Companies wanna hire ex-googlers. Have Google on your resume. It's better to work in BigCorp for 10 years rather than being contractor for 10 years.
* Improve your interview skills. For engineer it's theoretical computer science knowledge and cracking code challenges on a whiteboard within limited time.
* Have a big thing on your resume. Source code, GitHub, whatever it is.