Here's one: Get a high-paying software job in a high COL area, work for a decade or so while minimizing your expenses (live cheaply/with friends) and investing as much as possible in a diversified stock market portfolio.
Then when you're sick of it, move to a cheaper area, get a part-time job and sell 3-4% of your assets every year to make up for the deficit. If you're lucky, the safe withdrawal rate of 3-4% will even be enough (or close) to have the ability to quit working for a living completely. Or perhaps your part-time job can cover all your expenses and you can just keep letting your portfolio grow at the expected long-term rate of 6-7% per year.
Really good advice; this is what I tell everyone who has a high value skill like coding. The actual time frame is probably even shorter than 10 years if you are aggressive about saving.
If you're happy with and able to have children after the 10 years of aggressive saving and investment, this strategy will also give you an extra financial buffer for raising kids. The basic strategy is not incompatible.
But obviously, your total spending will increase, so you either have to earn more after having kids or save up more before having kids. If you want to raise your children in a high cost-of-living area, this will of course be even more pronounced.