1

So, we have a problem. I googled to find if it was a solved problem, and found a link describing an algorithm which is just about what we need. They also included a sample implementation. Just, not a std:: or boost:: library, like I was hoping for.

Copying and pasting is of course dangerous in itself, and of course might very well be infringing the license (which one it is in this case is not important; I'm asking in general for similar situations).

But what about taking the main idea, and implementing it from scratch? Or better still, describing it to a colleague so he can implement it, without ever having seen the original in detail? Could there possibly be a copyright forbidding that? My colleagues seem to think so.

After all, it's a clever idea, but an abstract one. It does not have enough details to create a unique "fingerprint" like using the exact same characters in a copied code, or even the exact same structure line by line, which just about proves the copy. After a few more thinking, I could very well have come up with the same idea myself. And now I could be banned from ever using it because I 'confessed' having read it from someone else? Could I also one day be accused of copying because I actually independently came up with the exact same idea as someone else, because it's in fact the best way to solve a given problem? I have an hard time believing it; yet the world is sometimes a mess, so better to be sure. Has anyone more precise knowledge about this issue?

  • 1
    One cannot copyright an algorithm. Also, if someone put their code on the internet they inherently meant to help someone else in a similar situation. – Alternatex Aug 23 '16 at 12:50
  • 2
    @Alternatex So if I take some code you wrote and upload it on the Internet it is now free to use? – Vincent Savard Aug 23 '16 at 12:51
  • 1
    @KilianFoth That other question was about ethics, but I see the answers go into the legal aspect too. So essentially algorithms cannot be patented... except if you really want you can, by phrasing it differently somehow, so you can never be 100% sure. Also according to the accepted answer, "patents are a concern even if you develop the algorithm from scratch yourself, because an existing patent you don't know about may already cover that". Just great! – Francesco Dondi Aug 23 '16 at 12:59
  • @VincentSavard It may not be ethical but yes. Once code becomes a part of the public domain anyone can use it without legal ramifications. Ethics is a completely different beast and it's not part of OP's question. – Alternatex Aug 23 '16 at 13:00
  • 3
    @Alternatex While algorithms/mathematics cannot be copyrighted, the algo may be patented, and any implementation certainly is copyrighted. Also, the default license is "all rights reserved". Just because something is publicly visible does not give you any rights to use it. You are assuming an implied license based on the *intent* of the author. That's dangerous because intent is difficult to determine – absent of an explicit license, the code I publish (on StackOverflow, on my blog, …) is supposed to illustrate some concept, not to be copied verbatim. – amon Aug 23 '16 at 13:01
  • @amon I'm not talking about copying verbatim, actually, just using the main idea. – Francesco Dondi Aug 23 '16 at 13:04
  • @amon I don't want to be annoying but you cannot patent an algorithm, at least not in Europe. I'm not sure about USA though. Also, all the code that you publish on StackOverflow falls under the [MIT license](https://opensource.org/licenses/MIT). Doesn't that allow anyone to copy it freely? – Alternatex Aug 23 '16 at 13:10
  • @Alternatex you can't patent an algorithm, but you can if you call it a "machine", according to various answers... Anyway, the code I'm talking about is not on stackoverflow, but on a personal blog. He "probably" hasn't summoned lawyers to find a way to patent it, but I have to convince others. – Francesco Dondi Aug 23 '16 at 13:23
  • related to what @amon mentioned: [What is the “default” software license?](http://programmers.stackexchange.com/questions/26548/what-is-the-default-software-license) – gnat Aug 23 '16 at 14:03
  • Amazon has a US patent for "one-click buying". The concept is almost to simple to call an algorithm, so discussing whether algorithm are patentable or not is beside the point. It is clear even seemingly simple ideas can be patented. – JacquesB Aug 23 '16 at 14:59
  • @Alternatex Some jurisdictions allow software patents, and even without them some software may rely on patents. A high-profile example are the [MP3 patents](https://en.wikipedia.org/wiki/MP3#Licensing.2C_ownership_and_legislation) which had (and in the US still have) to be licensed for MP3 software. Regarding the StackOverflow license, the [terms of service only mention Creative Commons for Subscriber Content](http://stackexchange.com/legal/terms-of-service) which is highly problematic for code. [Attempts to dual-license under MIT are currently on hold](http://meta.stackexchange.com/q/272956). – amon Aug 23 '16 at 16:01

1 Answers1

3

Warning: here I'm talking specifically about US copyright law, though copyright law tends to be fairly consistent internationally as well (there are quite a few international treaties about copyrights).

Copyright covers the expression of an idea, such as a written description of an algorithm or an implementation of an algorithm. IOW, the web page you looked at and the code are both (probably) covered by copyright.

A copyright cannot cover the underlying idea itself though. In this case, that would be the algorithm implemented in the code; copyrighting that simply isn't allowed.

It is possible to patent an algorithm, but patenting is a completely separate process from copyright, and the protection it gives is rather different as well.

One big difference between the two is this: copyright happens automatically. When you write something (e.g,. my typing this answer right now) it becomes copyrighted immediately by default. There are exceptions (e.g., some work that's funded by taxes automatically belongs to the tax-payers, so it's not copyrighted) but the simple rule of thumb is that copyright applies to essentially anything you write, by default.

Patents do not happen by default. To get a patent, you need to submit an application to the patent office describing your invention in sufficient detail of a person of ordinary skill in the (relevant) art to implement that idea. There are quite a few more rules, about things like what sort of invention can be patented (e.g., mathematical formulas and abstract ideas can't), and when you have to apply for the patent (soon after invention), and if you don't follow those, you're likely to lose any possibility of patenting that invention at all.

So, if you want, you can do some searching at the applicable patent office to see if somebody (possibly, but not necessarily, the author of the web page in question) has a patent on the algorithm in question. If so, that limits your ability to use that algorithm (but doesn't necessarily stop you entirely--for example, it's entirely possible to license a patent).

Assuming it's not patented, we're left with the question of copyright law. Here the standard is that a copyright covers the original expression and all "derived works". Exactly what constitutes a derived work can be difficult to determine (quite a few court cases have revolved around that exact question).

In the past, a fair number of people have use essentially the strategy you describe though: have one person (or group of people) write an abstract specification of the algorithm, then pass it (without accompanying code) to somebody who's never seen the original description of the algorithm, or the original code, and have them develop code to implement that algorithm. In a few relatively elaborate cases (e.g., when Phoenix "cloned" the original IBM PC BIOS) they had a third group of people (largely attorneys, I believe) to ensure that all the communication between the other two groups was completely "sanitary"--i.e., look at what the first group produced and ensure it didn't contain anything on which copyright could possibly be claimed before it was passed to the implementation group.

Jerry Coffin
  • 44,385
  • 5
  • 89
  • 162