Also, if complying with the non-compete would introduce a hardship there is usually a way to just ignore it entirely.
So, let's say you're a database specialist picked up to tune someone's DB, part of the contract you sign (probably unwisely) states that you can't work tuning DBs for the next 6 months after signing. If, after two weeks at the job, layoffs happen and you're let go then it's likely that a judge would dismiss any enforcement of the non-compete.
But here's why this _is terrible_ either you need to secure a waiver of the non-compete from the company based on goodwill in advance (which the company has very little motivation of doing) or you could consult with a legal expert about the validity of the non-compete (for the cash monies) or you find a new job and hope no enforcement is attempted with the onus on you to defend your new employment if the company decides to pursue you (which they very rarely do)
So it's basically like pirating music in the 90s, there's a thousandth of a percent chance that some company is going to try to ruin your life over it, and if they try there's another thousandth of a percent chance they'll succeed. But if they do, it is _terrible_.