>> Most of us have contracts that grant IP of what we create to our employer at least during work hours
That's an American thing. I work in Central European country, and IP that I create belongs to me until I pass the rights to my employer. Conveniently, my contract states that the act of committing my code to employer-hosted git repo is the act of giving up the copyright.
You can easily do that for two employers at the same time.
What happens if you are helping a colleague and need to share a code snippet with them? Or you suggest a change to the code during code review? How does your employer get rights to use that code?
That's an American thing. I work in Central European country, and IP that I create belongs to me until I pass the rights to my employer. Conveniently, my contract states that the act of committing my code to employer-hosted git repo is the act of giving up the copyright.
You can easily do that for two employers at the same time.