I find the notion of age discrimination at 30+ to be simply ludicrous. I’ve been at multiple top tech companies, and the very common age ranges were mid-20s to (estimated) late-40s.
Older devs exist but they tend to be very senior with a lot of responsibility in my experience. Where does that leave the competent but non architect level dev who doesn't want to be responsible for that level of pressure? Maybe a 40 yr old wants to just take a mid level CRUD job for the purposes of keeping up with his mortgage and has no other ambitions beyond that? It seems like being "just a guy" is looked down upon the older you get which is not fair when there are plenty of those types of roles out there (mostly given to younger people)
I interviewed at a Fortune 100 tech company when I was 35. The head of the development center declared to me that "people don't come here to retire". I was hired because they needed a niche skill that I possessed.