Except after taxes and expenses you're lucky if you're saving $1000/month at that day job. After 40 years, assuming 5% annual compounding on your investment, which requires to be almost entirely in risky investments like stocks, you could end up with 1.5 million. On the other hand, 3 million after taxes out of the initial windfall of 5 million, at 5% return would let you pay the exact same expenses while still growing by over $5000/month. You'd end up with $30 million at the end of 40 years. Huge difference.
In the US a young, single developer who follows a budget should be able to save at least $2k/month.
$80k/year income less 25% for payroll & income taxes leaves $60k/year.
$1.5k/month in housing & $1.5k/month in food/utilities/cell phone/clothes/etc. is $36k/year in spending, leaving $24k for savings. (This also ignores the tax advantages of retirement accounts, which allow for more room to save or spend)
The average nominal returns of the stock market are over 10% per year: a very simple & conservative investment portfolio of 60% S&P 500 index fund & 40% US Treasury bonds yields about 8.7%/year. If we assume 2.7% inflation we get 6% real return/year.