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.