In California, where all the magic really happens, non-compete clauses are unenforceable. See paragraph 4
https://en.wikipedia.org/wiki/Non-compete_clauseIn other jurisdictions, there has to be a 'consideration' (like money) and the clause has to be time limited and location specific.
There have been HUGE lawsuits in Silicon Valley over
companies agreeing to non-compete by deciding not to raid each other's employees. Non-poaching they called it. Cost them nearly a half billion dollars:
http://fortune.com/2015/09/03/koh-anti-poach-order/Employment contracts in the US are exceedingly rare. Most states are like California - employment at will. The employer can fire the employee for any reason or no reason at all. OTOH, the employee can walk out for any reason or no reason at all. In Silicon Valley you change jobs by driving in the wrong driveway in the morning. If you know anything at all, you'll be hired in a heartbeat.
This topic is really pretty complicated and is going to depend on location. There's a lot of case law in the US, some good, some bad.
Do you know why Silicon Valley companies seldom patent anything? Because they would have to disclose how it works or the process for creating it. The disclosure would give the competitors a leg up while the life cycle of the product might be quite short.
One company I worked for manufactured electrical products. We weren't allowed to have competitor's literature in our office even if we got it at a trade show or it was a commercial catalog. No supplier's coffee mugs, hats or other trinkets either. If the word "Proprietary" showed up anywhere in a document, we were to dispose of the item immediately. We shouldn't have gotten it in the first place. Pretty strict!