Jeff Kaufman thinks so:
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.
I don’t believe the sky is falling, but Jeff’s advice is good nonetheless. One thing you can start doing right now (and is always a wise move) is to live beneath your means. That way, if/when your means are substantially reduced, you may feel a pinch, but it won’t squeeze you all the way out.