What it means to compete will be decided by judges and lawyers in the gray areas but probably not hard to imagine clearly problem areas and likely not problem areas. If you want to know for sure, ask a lawyer and get a contract/letter from your employer to clarify.
> If a work is made for hire, the employer or the party that specially ordered or commissioned that work is the initial owner of the copyright in the work unless the employer or the commissioning party has signed a written agreement to the contrary with the work's creator. For legal purposes, when a work is a “work made for hire,” the author is not the individual who actually created the work. Instead, the party that hired the individual is considered both the author and the copyright owner of the work.
I fail to see how doing this during hours you are paid by the company, on their equipment, and for their specific operations...wouldn't be considered a "work for hire" in copyright law.[0] The VAST majority of work done by salaried professionals during work hours, at work, which can even remotely be demonstrated to benefit the employer...is a "work for hire". IP assignment agreements are redundant, and mostly only "needed" to prevent employees from trying to claim they did it all after hours, outside of work, using zero inside information they knew from working their day job. It's generally trivially easy to show that some of the development occurred during work, on work computers, at work, using inside knowledge of the company (trade secrets).
> Section 101 of the Copyright Act defines a “work made for hire” as A) A work prepared by an employee within the scope of his or her employment, or B) A work specially ordered or commissioned for use if the parties expressly agree in a written instrument signed by them that the work shall be con- sidered a work made for hire.
Question 1: Was the work created by an employee?
Yes? Proceed to Question 2.
Question 2: Did the employee create the work while acting within the scope of employment?
Yes? The work is a work made for hire.
This seems to fall under (A). If the "bright-line" tests for (A) fail to affirmatively answer the question, then the totality of circumstances are considered via questions such as:
> Where was the work created? Did the hiring party provide the space, materials, or tools to create the work? Was the work created as part of the regular business hours of the hiring party? Was the work created during the creator’s authorized work time? How long was the relationship between the parties? Did the hiring party have the right to assign other projects besides the one under review? Could the hiring party direct the creator when and how long to work? How was the creator paid? Did the hiring party offer employee benefits? Did the hiring party remove taxes from the creator’s pay? Does the creator have his or her own business? Was the creator able to hire and pay assistants? Was the work created pursuant to the creator’s usual tasks? What skill was required to create the work?
But you weren't hired for writing that code. You were hired to do a job. The code you wrote was not part of your contract even though you made it to fulfill your other duties.
There must be a reason this clause is usually added to SW dev contacts.
If you write code (any unrelated code) during work hours - it's done on their time, they paid you for it, they own it.
If you write code(work related) even outside working hours - They own it. At best you might get some money for your overtime and such.
if you write (urelated) code on their laptops on test it on their infra outside work hours - gray area, can go either way. most likely a settlement and they get the code.
if you write unrelated code and test it with you own resources - depends on the lawyers but, in most places, it's yours to keep. If the CEO suite or senior management see value in it. Be ready to to defend it.
I did have this exact discussion when I started with a global 500 corp as I do write code for various things when needed and also write small apps for extra £. The above pretty much sums up the discussion with the UK lawyer. It's not my job to write code but I do to make my life easier. I also document it for handover if I decide to leave.
EDIT: a few typos and the below
The lawyer's advice was, if I write anything unrelated that I want to keep - publish/sell in my wife's name.