A colleague once asked: “And from a legal point of view, who owns the code that the developer writes?”. Having found out from lawyers all the subtleties of the rights to the code, I decided to share the acquired knowledge.

First of all, let's consider the simplest question: who, from a legal point of view, belongs to the code that the developer writes at work? So, according to paragraph 2 of article. 1295 of the Civil Code of the Russian Federation: the
owner of the program developed by the employee is the employer. The employee (author) is not entitled to dispose of the results of intellectual activity capable of legal protection, created during the period of working for the company and performing its job duties. We translate from a legal language to an ordinary one: the code that you wrote during working hours, on a working computer, for a specific project belongs to the employer. The company receives the code, you - the salary. Further, the company transfers the project to the customer (if it exists), and to whom in this case already belongs what you and your colleagues wrote, decides the contract between the two legal entities. But that's another story.
Suppose your team wrote a great project, it was put into operation, and you switched to a new one, but very similar to the previous one. Then the question arises: whether to use the old practices? The fact is that at the legislative level there are no precise instructions and explanations on this issue, and the border here is very thin and foggy. Therefore, the old developments need to be modified so that you can easily prove that the rights of the previous customer are not violated, and the project he paid for is not transferred to another company. Fortunately, each project is unique, and most likely, transferring the old idea to a new project, you will have another program. But still, there are cases of "copy-paste", and we will tell 2 stories.
')
Example
The development team of the company "A" wrote the program, "Starry Sky". Then one of the developers moved to company "B", where he became one of the authors of the program "Night Sky". Somehow (no matter how), “A” learned about the “Night Sky” program and sued “B” for theft of intellectual property (and, of course, asked for compensation). The court ordered an examination of the “Starry sky” and “Night sky” source code fragments. As a result, it turned out that the programs differ in two lines in the name of the registry branch for storing settings that determine the methods of the program, and instead of:
"\ Software \ Company_A \ starry sky \ Alerts" was: "\ Software \ Company_B \ night sky \ Alerts".What ended the case, easy to guess.
Second story
3 developers of the company “E” wrote the Software Complex for Automation of Enterprises and even registered it in the State Registry of Programs. But then they had a conflict with the employer, and they moved to company “D”, where they wrote the Automation System of enterprises engaged in commercial activities. She was also registered in the registry. At some point, E found out about the D program and filed a lawsuit. The examination, appointed by the court, revealed that the “D” enterprise automation system is the result of processing, and not a unique program. As a result, the court upheld the lawsuit, banned “D” from using the program and set a fine.
* The stories are taken from actual legal practice, but for the calm of these companies, all names have been changed to conditional ones.Consider another program rights situation. You write code for yourself at home and publish it on GitHub. After a while, you realize that your achievements fit perfectly into the project. Is it possible to use a personal code on a project, how to do it correctly, and to whom will it belong?
If your personal development was created under the requirements of a specific customer during the period when you worked on his project, then it will be recognized as an official task (according to article 1295 of the Civil Code of the Russian Federation). This means that the rights to the code belong to the employer, even if you did it in your free time and posted it on OpenSource. If your development is not tied to a specific project, you did it on your personal computer and published it on OpenSource, then it “gets” an open license, and then you are its full owner.
Often, the use of such developments on the project customers limit or even ban. In this case, in agreement with the customer, the option of alienating the rights to such a program in favor of the employer with its subsequent removal from open access is possible
. This will mean that you have transferred the rights to the program to your employer or customer. If there is no such restriction, then you can offer to draw up a license agreement with the company to use your developments on the project. But the customer should be notified about the use of such a program. Either in the reporting documentation, or in the text of the program itself, a license agreement to the open license or a link to it should be included. If this is not done, understand whether the developer’s library is being used on the project, or if the developer has “pulled” the customer’s code - it is difficult from a legal point of view, and the case may go to the intellectual property court.
While the Russian judicial practice does not know the lawsuits in cases related to OpenSource, it is possible because article 1286.1 of the Civil Code of the Russian Federation devoted to an open license appeared in our country only in March 2014.3 simple conclusions
- The code that is written for a specific project belongs to this project. But the idea of the program - no. But you should not confuse these two concepts.
- Before you use programs with OpenSource on a project, find out how the customer treats them.
- We all copy small pieces of code when we need to replace just one character, but copying as many large fragments creates a large amount of similar code, the same fragments have to be manually changed, at the risk of missing something. So copy-paste can just the opposite complicate things and add errors.
Thanks for attention!