Summary: we don't understand why programmers are paid so well. If you're a programmer, there's enough of a chance that this is temporary that it's worth explicitly planning for a future in which you're laid off and unable to find similarly high-paying work.
Programmers are paid surprisingly well given how much work it is to become one. Here's Dan Luu comparing it to other high-paid careers:
If you look at law, you have to win the prestige lottery and get into a top school, which will cost hundreds of thousands of dollars. Then you have to win the grades lottery and get good enough grades to get into a top firm. And then you have to continue winning tournaments to avoid getting kicked out, which requires sacrificing any semblance of a personal life. Consulting, investment banking, etc., are similar. Compensation appears to be proportional to the level of sacrifice (e.g., investment bankers are paid better, but work even longer hours than lawyers).Medicine seems to be a bit better from the sacrifice standpoint because there's a cartel which limits entry into the field, but the combination of medical school and residency is still incredibly brutal compared to most jobs at places like Facebook and Google.
My sister is currently a second-year medical resident, and "incredibly brutal compared..." feels like a understatement to me. She works 80hr weeks, often nights, helping people with deeply personal and painful issues that are hard to leave behind when you go home. This is after four years in medical school, with still at least a year to go before starting to earn doctor-level money. When I compare it to how I started programming right out of college, making more money for 40hr weeks and no on-call, I feel embarrassed.
What makes me nervous, though, is that we don't really understand why programmers are paid this well, and especially why this has persisted. People have a bunch of guesses:
Demand: as software eats the world there are far more profitable things for programmers to do than people to do them.
Supply: it's hard to train people to be programmers, fewer people are suited for it than expected, and bootcamps haven't worked out as well as we'd hoped.
Startups: big companies need to compete with programmers choosing to go off and start companies, which is harder to do in many fields.
Novelty: the field is relatively new, and something about new fields leads to higher profits and higher pay, maybe via competition not being mature yet?
Something else: I'd be curious if people have other thoughts—leave comments!
Specifically, I'd recommend living on a small portion of your income and saving a multiple of your living expenses. It's far more painful to cut expenses back than it is to keep them from growing, and the more years of expenses you have saved the better a position you'll be in. If you take this approach and there's no bust, you're still in a good place: you can retire early or support things you believe in.
If being laid off and unable to find similarly high-paying work would be a disaster, figure out what you need to change so that it wouldn't be.
(This isn't really specific to programming, but I think the chances of a bust are higher in programming than in more mature fields.)
Comment via: facebook
Poor understanding is in the map, not the territory. I started to write a comment arguing that this is incorrect, that the factors which cause programmers to be well paid are straightforward and aren't going to go away. But instead of that, how about a bet.
Here's the US Bureau of Labor Statistics series for 2nd quartile nominal weekly earnings of software developers (applications and systems software): https://fred.stlouisfed.org/series/LEU0254530600A. They didn't seem to have mean, median, or other quartiles. There are other series for different subsets of programmers, like web developers; I chose this one arbitrarily. The series is not inflation adjusted.
I will bet up to $1k at 4:1 odds that the 2030 value in this series will be greater than or equal to the 2018 value, which was 1864. So $1k of my dollars against $250 of other peoples' dollars.
(I'll accept bets in order of their comment timestamps, up to a maximum of $1k of my dollars. Bet is only confirmed if I reply to accept it. Winner must remember to email to claim bet winnings. Bet is cancelled if the US Bureau of Labor Statistics discontinues the series or doesn't publish a 2030 number for any reason. Non-anonymous counterparties only.)
I don't specifically remember, but I think I was mostly going for "only have to check the number in one place" (not expecting that the series would stop in 2019), and secondarily I expected we both thought inflation would be predictable, and so this provided some margin in the case where wages stagnated but didn't fall by much.