These $300k+ salaries you speak of are no more common than any other field where maybe 1/1000 makes this. HN is quite heavy with Silicon Valley coders at Google, Facebook, etc.
The 99.9% of the rest of developers are making $90k in the Midwest up to $150k in high cost areas on the coasts.
Yes this is certainly better than most other jobs, but considering a developer will hit the inflation rate raises by about 30, while other professions like doctors and lawyers tend to continue seeing large raises, I really don't feel software is a great gig, all things considered.
Mid thirties and I'm already seeing my first decades's go-to languages and frameworks becoming obsolete (Java, MVC, single RDMS, etc). Taking the massive amount of time to learn the new ones will not increase my pay one bit, but just give me another few years of employment.
It was great at 28 making $90k while most my peers were still in grad school and / or making $40k in crappy positions. But now a lot them are getting into mgmt, making partner, have a good book of customers, and have caught up. Even a few Fed and state workers I know with liberal arts degrees are hitting six figures with the gov't, along with job stability, pensions, and guaranteed raises. Meanwhile we get more H1Bs and offshoring.