In the case of trade secrets, I would not have an issue fulfilling the clause, provided it was worded in such a way that it did not preclude me using skills gained on the job for a different employer. Otherwise it impacts my ability to provide for myself in future, so I can't take the job unless there is financial compensation over and above a normal salary.
For a non-compete I would probably tell them I was just not willing to sign at all as it would definitely impact my ability to provide for myself in future.
But at that point I think it's perfectly reasonable to offer a compromise - "as this restricts my ability to find future work, I will need to be paid for the duration of the clause, or I cannot accept the job"
Also in this scenario, employers generally won't make you sit out for the full length of the non-compete. They may have you sit out for a few months until the critical product you were working on launches and they can claim first mover advantage, etc. Since it is now a business case, it generally makes no sense to make old employees sit idle for a year.
Either way, that just tells you the compensation for the non-compete should be at higher than your usual salary, does it not?