4

Imagine that during writing software for the employer, I created simple helper function
IsPositiveNumber(x) which returns true if x > 0 and false otherwise.
Or function TrimBlanks(text) which returns text without leading and trailing spaces and tabs.

Let's say that those functions are very simple inside and can be re-created by an average developer in a few minutes.

Now, if I will create an open-source software or change the employer, how serious ownership violation would I commit when I will simply copy those two functions into new code?

Maybe shall I open-source such functions and then ask for permission to include that open-source library?

And even if I will write them anew, it is very likely that they will be 90% identical with original ones (including their names), because there are not many ways (in my mind) how to create their body or how to name them.

So does it matter if I copy those functions over or if I write them anew? Even if I write them anew, how can I prove that I did not copy them?

Or is this a thing on which no sane person will build an IP lawsuit?

6

As you've presented them, I doubt the functions are protected by copyright in the first place.

Originality is one of the threshold requirements for copyright protection, and it demands that the work in question be independently created by the author, and that it possess some minimal degree of creativity.

If you're talking about programming at a level so basic that the function truly must be created in a particular way, there is no originality in simply following the instructions. And even if there's some wiggle room, but the language you used has likely been independently replicated by many programmers, that's still not original enough to be copyrightable.

What you want to watch out for, though, is the possibility that they've been combined into an original arrangement that is protected. I don't know enough about how copyright law is applied to code to say where or how that line is drawn, but my instinct would be that it could be a fairly low threshold.

2

In US copyright law there is a doctrine known as Scènes à faire. See this Wikipedia article and this mondaq article for more on the concept.

In general this means that expressions which are so common as to be required in a particular literary genre are not protected by copyright. For example, having a secret rendezvous or a Swiss bank account in a spy novel would not make other such scenes infringements. In a factual work an "obvious and essential" way of expressing a fact is similarly not protected. This Copyright World article discusses the concept in the software context.

As the Wikipedia article says:

In a business and computer program context, the doctrine of scènes à faire is interpreted to apply to the practices and demands of the businesses and industries that the given computer program serves. Hence, the concepts of idea vs. expression (merger doctrine) and scènes à faire relate directly to promoting availability of business functionality.

There is the nrelated doctrine that facts and ideas, as opposed to expressions, are not protectred by copyright. As part of this, "obvious and natural" ways of expressing facts are not protected either. For example, a list of US Presidents, ordered by date of election, giving their names and ages, would not be protected by copyright.

I would take the examples suggested in the question to fall under these doctrines, and I do not think that they would be protected by copyright, at least in the US.

-1

If you actually copy these simple lines of code, then it is copyright infringement. If you write them yourself, then it is not. What happens in court is a different matter.

If you are accused of criminal copyright infringement, someone would have to prove beyond reasonable doubt that you copied. They would have to show that they have code and you have code that are sufficiently similar that they may have been copied and possibly slightly modified to make your code different. It would be most helpful if they can prove that they had this code before you did. It would be most helpful if they can prove that you had access to their code. All these they can prove.

Then they would need to show that the code is so complex, that you can only have the same code beyond reasonable doubt by copying theirs. To argue against this, you might be able to show some publicly available code that you both might have copied from, or you might hire an expert witness who testifies that it is quite possible to write this code independently.

For non-criminal infringement, the same applies, except they don't need to prove "beyond reasonable doubt" that you copied, only to show it is more likely that you copied than not. One way to prepare for a defense is to use source code control to demonstrate that you created the software over some amount of time. For example, if you can show that you have a version A that doesn't work at all, a version B that has no comments and a few bugs, a version C that has lots of good comments and fewer bugs, and a version D where all the bugs have been fixed, that makes it much more likely that you wrote the code yourself.

  • Thank you for the insight. Actually I would have no problem admitting that I basically used that general code (which I created before) again because the way how those solutions are arranged in my mind always produces the same outcomes. So the question is, if it a big difference between (a) plain copying what I previously typed into a file (b) looking into the code then typing it again a day later (c) typing it anew and never looking back, event if it will produce almost the same outcome as before. - From this viewpoint, pointing to scènes à faire looks reasonable to me. – miroxlav Dec 2 '18 at 13:12
  • 2
    I believe that this answer is incorrect, in that the example code is so closely tied to facts, to the problem definition, that it would not get copyright protection at all. It would not be considered original enough, winch is the true root of the scènes à faire doctrine. That said, this answer is quite correct about what might happen if the copied code is considered original enough to be protected, and no one can be sure about that until a court rules. – David Siegel Dec 2 '18 at 16:12
  • Assuming that the code is protected by copyright, a, b, and c are probably all going to be copyright violations. But as @DavidSiegel notes and as I was just noting in my answer, the functions may not be protected in the first place. – bdb484 Dec 2 '18 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.