Don't worry, in most civilized countries such clauses are illegal. In the U.S. some states allow them but many companies either don't have them or don't enforce them.
Remember that in the software engineering industry, the (competent) engineer is the hot commodity. If your employer turns out a bad apple, just leave to a different one. That's what keeps the nonsense in check -- not regulations, but competition for the best employees. For employees this is a great situation to be in. Unlike in other industries.