So if you do have to sign one then the below is the advice I've been given by the employment lawyer's I've spoken to over the years.
1) make sure it says you are compensated for the time you can't work. ie if it says you cant' work for a competitor for a year then you should be getting a salary for the same duration. Some companies will try to give you a signing bonus and include language that the signing bonus is consideration for you waiving this compensation. I mean it's nice to get $50,000 in stock vested over 3 years just for signing, but it won't feel that way if your former employer also views this as compensation for you not working for a year.
I've had 3 or 4 employment lawyers go over this with me, both as an employee and as an employer and they've all repeated this, if the company doesn't' pay your salary during the non compete period then you just cant' sign it. Now they also stressed that this means the non compete is probably not enforceable but that won't be much consolation if they drag you to court.
2) Be very clear as to what "salary" means. So if you are a Google engineer and you have a salary of say $125,000 and then a bonus of say $100,000 worth of restricted shares vesting over 3 years and maybe a signing bonus of $50,000 worth of shares vesting over 3 years, you might brag that you just got paid $275,000, but the company will probably argue that they only need to pay you the pro rated amount of your salary over the waiting period.
Finance especially gets burned by this, as small salary and huge bonuses are how many hedge funds compensate their key employees, also known as the "you eat what you kill" compensation package.
3) Be very wary of telling your former employer of where you are going to work. There just is no real upside to it.
I've also been told not to hire former employee's in the first year you leave for a competitor. It's one thing for a company to loose you, but if you leave and take an entire team with you then even though you've probably done nothing wrong, it own't be very comforting when you are out of pocket $10,000's of dollars in lawyer fees and stress.
As always, IANAL, I've just happen to work in the most incestuous industry around, finance, and I've seen and heard too many horror stories of people leaving for another firm and bringing their team with them and then being in court for years.