I wonder what would happen if legal action started between two companies and it turned out a coder pasted code from personal projects that predates both.
I wonder what would happen if legal action started between two companies and it turned out a coder pasted code from personal projects that predates both.
If the code was something as simple as let’s say leftpad for a simple example, it could be argued that it’s not the “meat” of the application so those few lines can not by themselves be copyrighted but the whole work (or even larger portions of it) can be.
If it was some special sauce algorithm, it could be argued under their work contract that the employee assigned copyright of the code of the personal project to the first employer they did the work for.
It also depends on the status of the employee, the contract of the employee, and the jurisdiction of both employee/employee.
A “full fledged” employee work is often deemed as the companies property if done under the course of their employment. A contractor in the US is about the same, however in the UK a contractor by default can retain the copyright of the “work product” unless stipulated otherwise in the work contract (so most contracts will state that you as a contractor are assigning copyright for the work you do to the company).
So in that last case it could be argued that the coder still owns the copyright but licenses the use to both parties. It would then be a case of the two companies maybe suing the coder for selling code they may have represented as given them an exclusive license to it, but obv didn’t because it was licensed to multiple companies.
Highly unlikely. This was no FOSS web library he was working on, but some relatively cutting edge embedded automotive stuff, which few people do in their free time as a side project to put on github.
And anyway, according to most industry contracts and work laws, whatever code you check in your employer's systems during work hours and using work equipment, automatically now becomes your employer's code which you now can't share anymore.
My guess is that in your hypothetical scenario the first company would own the IP and could sue the worker or other company for infringement.