If this is true then how does moving job generally work in NYC? Presumably people there aren't expected to work for one employer all their life or take years off in between jobs?
What I doubt is that if a company tried to enforce one of these ridiculous agreements that it would hold up in court. Are you trying to tell me that if I work in networking for a new york company I can't get another job for 2 years? That's just not possible.
Only work you've done in the course of your employment is owned by your employer, by default. This can be modified by contract, however.
CA does not enforce some contracts while NY does, but the default is that you own all your after-hours work.
What I was told is that there are 3 classes of employee. If you punch in and out on a clock and get paid by the hour, you are hourly. If your work is governed by piecework contracts, you are a contractor. In those cases the scope of your employment is clear. Otherwise you're a professional employee. (Most programmers are professional employees.) For professional employees there are no working hours, and no non-working hours either. Have a good idea in the shower? Your employer has a potential claim on it.
Whether they can claim any given project is more complex, though. The farther away your activity is from your day job, the harder it is for them to enforce a claim. So, for instance, a programmer who writes programs on the side is likely in trouble. But a novel on the side is fine.
In any case the default doesn't matter that much in practice because standard boilerplate contracts reinforce this by making broad claims that anything you do in your own time belongs to your employer. And NY courts are fairly generous to employers in resolving any disputes that arise.
Also note that there are a lot of caveats where details of your specific situation could make you fine. (Or not.)
Have any examples of this actually being enforced (in court. I'm sure they've scared people with lawyer-ese before)? It's hard to image that the law basically says that the company owns you even if you're not "on the clock".
Also, this only protects people who are aware of it and willing to fight for it
It seemed like they were pulling a fast one, but basically they were compartmentalizing so they could claim the maximum rights should the law be struck down or repealed (or the business moved outside California, I guess).
In NY people try to maintain monopolies of information. One place that applies to is a very restrictive work for hire doctrine. If you have a job in NYC, by default everything you create belongs to your employer. Even if it was done at home on your equipment. In California that particular right is one that remains yours and cannot be lost (unless what you do relates to your employer's business).
The result is that in California it is common for people to have a day job and work on the side on a startup. You almost never see the side startup in NY. Furthermore if you do see it, those startups can be squashed in an instant when the employer finds out about it. I've seen it happen. Not pretty. (The same thing can happen, and does from time to time, with open source projects. However it happens less often because there are fewer cases where someone wants to leave their day job for their open source project than cases where they want to leave their day job for their startup.)
That nasty little dynamic is a constant hidden drag on NY. Nobody knows how many good ideas got squashed and never saw the light of day...