-You are in a role with high search/discovery costs but low replication costs: A quant developing predictive signals, a salesperson or attorney building a client base, a researcher improving Google's machine learning techniques, a chemical engineer at a petroleum company improving their processes, a pharmaceutical researcher, a chef trying new dishes hoping to find a hot new idea.
-Your work can't easily be protected by a patent. If you're developing brake pads or some other consumer product, the company should protect itself with a patent instead since competitors will just buy the product in the open market and reverse engineer it. However, even for these cases, knowledge of ideas that failed is a valuable roadmap for a competitor.
-The non-compete is specific and targeted to direct competitive behavior. For example a law partner should be blocked from taking his book of business to another big law firm for a period, but working as a judge or government official should be permitted.
-If unpaid, the period should be short. For a year or more, there should be significant compensation to enforce. The primary purpose should be protecting the company, not trapping employees or lowering compensation. For retention, bonuses and deferred compensation should be used instead.
If used fairly, non-competes are good for both the employer and employee. Businesses that share ideas openly, with mutual trust among employees, tend to perform better. People in R&D all work very hard, and eventually each should generate results, but some people are just lucky and discover great ideas sooner. If all your lucky guys/gals walk out the door immediately, the company can't invest as much in R&D.
And NDA/confidentiality contracts can only do so much. In obvious cases like a salesperson downloading his client list and profit numbers, or an engineer putting the source tree or product designs on a USB stick, it's a slam dunk case. But you can't vacuum someone's head. Someone who created a system at one company will likely create a similar system elsewhere. It's hard to make the case that a different system with some similar ideas, thought processes, or architecture is a direct copy.