I'm 50. I've been working in software development (mostly C++) for 25 years and my salary and bonus are at maximum levels. There are programmers under 30 that have talent but most trowel out shit code. Most know little of or care about design, correctness, etc. There may be age discrimination in some areas. I work in medical devices in MN where it must be less common.