1. Don't have kids
2. Work at one or more MAAAMs for 10-12 years, while living on $40k/yr
3. Retire, maintain lifestyle
If you somehow run out of money, just pull a Michael Jordan or a Jay-Z
Variations include working 3 years on, 2-3 years off, or working 3-4 months per year. The point is that if you're a programmer and you don't have children, you don't have to work very much.