In previous companies, I've signed IP agreements that basically said, "you code it? we own it. all of it"
I really don't like those kinds of agreements, but I understand them.
Now that I'm running my own company, and doing coding for infrastructure, I realize there's a need to formalize things a bit more, especially as I take on help.
I can completely understand $CUSTOMER wanting to keep code for a proprietary product in-house and private. Absolutely no objections there, whatsoever.
But what if you learn some cool technique while you're doing code, and you want to be able to reuse that later (and it has nothing to do with a customer's product specifically)
Is there some kind of licensing arrangement that covers that, so that learning and sharing of knowledge can still happen, but IP is protected?
That said I have a lawyer edit my IP agreements to scope them as tightly as possible to the company, instead of signing the broad "we own everything you make even outside of work". For some reason most devs seem to just sign them without realizing they have a say in the matter.
In my contracting work my lawyer added a clause about things that I create in the process to make my job easier so that no client owns those. There's a technical term for this but it's slipping my mind right now. It covers things like writing your own code generators and automation scripts that you might use with multiple clients but are not a part of the work product.