These clauses are enforceable in every state, though some states such as California limit the breadth of "related" to the specific industry or industries in which the employer operates.
His company is paying him to solve problems in a particular space. Once he solves them, he knows how to solve them in the future. When working on an OSS project in the same space, he can apply the techniques he learned at his job to that project.
Your employer does not pay the time you spend on work-related research (or even general research)? Change job. It's part of what programmers do - find solutions to problems, and since most problems we're facing are variations of problems other people already solved research and learning about possible solutions are an important part of our work, I'd even say the most critical part. I'm happy to compensate my employees for that.
> which is why non-compete agreements are invalid
There's no noncompete clause being discussed here. It's basically a case of "I'm building the same product as at work, just for free" and the guy is making a direct competitor to his employer. Sorry, if one of my employees did build a competing product while being employed here without explicit permission, I'd fire him.
If the guy build something mostly unrelated to his work, I'd totally agree with him, but the way this case looks like, no, I'm not.
> No, he is not on either count.
Yes they are... are you honestly trying to tell us you've learned jack all at your current employer? No new frameworks, coding practices, algorithms? Learnt absolutely nothing about how various patterns of software writing pan out in production?
If you've learned absolutely nothing, you have to be one of the most useless developers your employer has. I find that impossible to believe.
> > that's what your paid for.
> I don't know you, but I'm paid for the work I produce, I'd be really happy if I could be paid for learning stuff and not doing shit.
No, you're being paid for your skills and abilities. That includes your learning ability. It's not "learning stuff and not doing shit", it's "learn stuff as you're doing shit". Everyone does it. A company can't guarantee where or what it's going to be working on next year or so, the market always changes. What they do have is staff capital, including hopefully a team of capable programmers that can do whatever the changing market requires, be it picking up a new language, optimising algorithms, etc. That's what people hiring and employing staff are looking for. If you're not bringing all your abilities to the job, including your ability to learn, then you've been working under really crappy bosses who have been letting you get away with it.
In this particular case he's working on a CI system both in his day job and his out-of-hours work. Are you seriously trying to tell us he learned absolutely nothing about CI during the day time, and only learned stuff out-of-hours? That he gained absolutely nothing from his colleagues? Operational aspects of the software? UI?
No, he is not on either count.
> that's what your paid for.
I don't know you, but I'm paid for the work I produce, I'd be really happy if I could be paid for learning stuff and not doing shit.
> The construction company would have a valid claim if you stole the blueprints at work.
Yes. It would not have a valid claim if you built stuff on the side, even if it's better stuff. Your company does not own your knowledge, which is why non-compete agreements are invalid in just about all jurisdictions unless very heavily compensated (in Germany it's at least 50% of gross and no more than 2 years, and clauses can still be found unreasonable and invalidated).