What you said is federal law. But what my lawyer told me when I lived in NY is that "in the course of your employment" has non-intuitive consequences.
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.
I view it similar to apartments that don't explicitly state 'no pets'. If you're not hoarding pets or using company related IP, odds are good you're in the clear.
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.