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.
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.