Some folks will try to be "architects" (used in quotes because there are lots of definitions about what that means), and some will go into management.
As a coder, your pay will definitely plateau. One of the interesting things about the current situation for 'rock star' coders is that their pay will plateau faster, this will be a problem for them later. If you can get a number of people on the same page to build something bigger than what a single person can build (not so much management as technical leadership) then you plateau will be a bit higher (roughly 20% if you believe salary surveys).
Keeping it fun is key though.
Mine seems to keep climbing. I'm hearing reports of >$300k, and have received an offer in that range myself (counting signing bonuses and stock grants). Granted my pay might plateau there, but honestly that's enough money to keep me happy without having to see it go up every year.
I'm a total generalist, but I also have a few areas where I would qualify as a specialist; that offer I'm sure was because of the specific skills I've built up. I've also been programming professionally since 1989, and I try to keep learning, which can't hurt.
Agree that keeping it fun is key. :)
There are two problems with hitting a plateau @ 300K: Housing costs and College Tuition.
At the traditional 3x debt to gross income metric, your home mortgage would be capped around ~$900k, vs the $1.3-1.5MM range of current trading prices. Which is not terrible if you lock something in. However, once you are at 4x paying for schools becomes a far greater challenge. You could be looking at anywhere for $175-250 per kid. So, capitalize this and you are at $350-500K. That is, your combined "future obligations" would be something in the range of $1.7 to $2.0MM (exclusive of retirement). Which is something closer to 6.5x gross income. Which is pretty highly leveraged. You're after tax cash flow without real-estate tax shields could easily be ~200k, so you are looking at something like 10x cash-flow leverage. That is about as high as most PE guys will take a decent c-corp.
Just start shielding your income and assets as soon as possible. Strategize to minimize exposure to asset inflation (housing, education). The IRS (tax man) and the "doo gooders" in academia (ironically, the new "alternative minimum tax" man) have really boxed in the middle class (read: the not-rich enough) from the perspective of lifetime earnings. Most of your "savings" will be at risk to get swept from you, thanks to "financial aid" effect driving college tuitions.
These numbers get bounced around every now and then but they are worth considering. Inflation in "raw materials costs" for knowledge workers (kids) need to get passed on to customers (ie, employers) if you want to stay in the same place (red queen effect and all that).
This is relevant when you are evaluating career moves down the road.
3 bedrooms (Weekly Average Prices, San Francisco)
I understand that everybody wants more money - hell, I want more money too. But a lot of that is because everybody wants to be in the top 1% of nice neighborhoods, nice homes in nice neighborhoods, nice colleges, etc. You can have a life that is just fine on far, far less than $300K/year.
>And a lot of people who don't understand working in tech
Boulder, CO, has the highest density of people working in tech in the country. You were saying?
Edit: Oh, I see - you've confused me with the person way up-thread with the $300K income, I'm not the same poster as he. I don't like to reveal my income on the Internet, but I'd describe it as "enough", so, to answer your question:
1.) Be alert to pure, dumb luck when it happens, and willing to take advantage of it - including dropping previous plans - when appropriate. I thought I would always work in small companies or startups, but I applied to Google in the depths of the 2008 recession and somehow was accepted, so I figured I'd give it a try. I've been there 5 years, with a fairly generous option grant, and the stock price has quadrupled in that time.
3.) Be curious about the world around you, and in particular, about what the people around you are doing. Every single job I've had, I've gotten through my network. In some cases, those connections were several years old, but I reached out and asked them what they were up to and it turned out what they were up to needed people.
4.) Don't be afraid to leave when you've outgrown a place.
With one caveat:
>Always hone your skills so that when an opportunity arises, you can pounce.
My strategy has been to follow my passions, which include digging into various technologies that interest me. I don't do it "so that" I can be relevant. I do it because it's fun.
It just happens that, when you get good enough at enough things, you'll find that at least some of those skills are in demand. I know a lot about so many programming topics that one coworker just accused me of having "an encyclopedic understanding of just about every topic."
A lot of people have their curiosity tortured out of them by their experiences in school. Anyone reading HN likely is at least on the road to lifelong learning, so anyone reading this is likely on a path that could result in a strong salary. To those who complain that reading about every latest new technology is boring, I say: Find your childlike curiosity and reclaim it.
Luckily, since you're making $300K you have essentially no problems outside of this. Aside from your sourpuss attitude.
I moved out of the Bay Area and own my home outright. The offer lets me work from home where ever I want (with some restrictions). So home cost isn't relevant to me.
And on the college tuition front: While I wouldn't necessarily advise it of today's high school graduates, by the time my kids are ready for college I don't expect college to look like it does today.
Or rather, I expect companies to be more concerned with what you know instead of how you learned it, and with the huge movement toward making effectively entire college educations free online, I think that the face of college will be transformed -- and made correspondingly less expensive -- by then.
It's already true to some extent, and if the question is between going into serious debt or getting a college degree, I think the prudent choice might be to use free or inexpensive online courses to get a degree rather than piling up serious debt for a questionable advantage in getting a job. It seems like "free internships" are already the way to get on-the-job experience, and that's a lot harder to accomplish if you've got a huge debt that's demanding to be paid.
In addition, politically speaking I think we're at the extreme right end of the pendulum swing right now, and once things swing back a bit to the left, state schools will become more affordable again. A lot of the rise in costs has been correlated with the fall in state funding. Though the rest of the rise in costs can be attributed to the rise in administration salaries; almost a half million/year for a UC Regent?  How much value can that regent possibly be bringing to the UC system? How many others like him are burning up the money that people are paying to get a good education?
It also happens that the same basic financial strategy one might employ whilst making $30,000/yr applies whilst making $300,000/yr. That is, spend less than you earn.
Or to put it a little more brazenly:
Debt to gross income metric? You fucking make $300,000/yr! Why on Earth do you need to be borrowing money? So you can afford to live in the bay area? So you can "put it all on black" investing in something-or-other? I'm not saying you're wrong to do it, but for Christ's sake don't complain about not having enough opportunity. Your problem isn't your leverage, it's your stupidity.
Spend less than you earn!
If your $300K/yr job is in the Bay area, and you like the job and area, it seems eminently reasonable to borrow money to buy a house there.
All the families I know in SV are either lawyer/finance/medical, 2-income households, or cashed out.
There are in fact lots of developers doing nothing but development making well north of $200k. That's less than a $100/hour bill rate, which is not at all uncommon as a contractor. If that's something you want, know that it absolutely is attainable.
I think you'll find that, in all walks of life, people who make lots of money tend not to post on internet message boards (or salary surveys) about how they make lots of money. Definitely don't take the lack of people spouting off here about their 1%'er incomes as a sign that those people don't exist (or aren't, in fact, here reading this thread).
I don't think that's accurate. Most? Really? Maybe the top 5 or 10%, and in most cases I suspect they are team leads with 3+ devs either reporting or defacto following their lead.
It's absolutely not the case outside of USA coasts.
Can someone give more information/source on this?
300k is definitely not the tract most programmers are on
No, you don't see this in start-ups. I think HN may skew toward people who usually work in start-ups, so the perceived average will be lower as a result. Until this recent offer, it was my perception as well.
And no, that's not quite my pay grade, but a lot higher than the plateau that I think people are imagining. I think some developers do get sick of the programming, or they stop learning and go stale, before they get to be an anomaly like me. ;)
Also, making $150k with a $150k signing bonus is not anywhere close to 'making $300k'. What do you earn in year 2? $150k (plus whatever raise and annual bonus, but annual bonuses don't typically make up a huge part of your annual income in software, as they do in finance).
Almost the same in cash, but a little more in stock grants.
Years 3 and 4 have a lower salary but much larger stock grant vesting, that at today's stock price mean that I'd be making roughly the same amount in each year. If their stock crashes, then I might leave, though they mentioned that after the second year they may up the stock grants for the following years.
And if their stock keeps going up (as it has been), then I would be getting a de facto raise in years 3-4. But I'm fine with the first 2 years; my personal burn rate is low, and it would let me work on personal projects full time again after the two years are up.
Several people I know are in that range. But they all specialize in one thing or another.
My gross comp is ~$350k, 60% cash.
The 3 main learnings that I've leveraged to get that high are:
0) be the top performer on your team, no excuses
1) ask very explicitly for the things you want 
2) negotiate from a position of power (have a BATNA )
 "I'd like a raise" != "I'd like my salary to be $X"
Personally, the only people I know in the 200+ club are in some form of management and rarely, if ever, code anymore. But then we are back into the anecdotal realm..
* Machine learning + finance
* iOS (I know several examples here)
* Enterprise Java
* Embedded development
* Specific scientific expertise (a friend is into optics and diffraction and makes $250/hour freelance, with some coding and some design)
I don't know any COBOL programmers. Or at least if I do, they're in the closet. :)
This is universally from big companies like Google, Apple, Amazon, Facebook, Microsoft, Ball Aerospace, etc.
But I'm not counting it right now, regardless. The cash part of the offer is entirely enough to keep me happy for each of the first two years, and the stock is a bonus.
Starting in year three, though, compensation is nearly half stock. I did code through the 90's, so I'm going to take any stock valuation with a grain of salt. I'll reevaluate my options at that time, if I decide to stick with them for that long.
I think that if salary levels hadn't been effectively frozen starting from the '70s until now, $300k would be about "normal" for a middle class income.
It's not that $300k is a lot of money, it's that the people of the US (and the world in general) have been cheated out of their share of productivity improvements. There's a great video that talks about stagnant wages and the problems that are the underlying cause of the recent collapse(s) of the economy.