views:

140

answers:

6

Is it legal to use source code from papers and such?

Like this paper on perlin noise: http://mrl.nyu.edu/~perlin/paper445.pdf

Links to this source code: http://mrl.nyu.edu/~perlin/noise/

And Stam's famous talk on fluid dynamics, includes source code throughout, annotated with instructions like "add these macros to the beginning of your code": http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf

I'm just not sure if it's legal to copy and paste this to use in your own commercial code. if I were to make my own implementation, it would end up being close to identical, since I'd probably use the source code as a reference. I know very little about copyright law, including how it applies in these situations, and I can never find usage and licensing terms for these. Nor did googling any terms I could think of provide me the specific answer I need.

Does anyone know for sure what the rules/laws are here, or where I can find the answer?

+4  A: 

All code is automatically copyright, and the default license is 'you're not allowed to do anything with the code'.

However, this stuff is published for a reason, namely that it's useful and the author wanted people to see it. But unfortunately, you're going to need to find or get an explicit license (you want a BSD style open-source license if you want to use it for a commercial project). Best way if you can't find the license in the code is to ask the author.

Andrew McGregor
Thank you. I suppose my followup question is, it must be legal to use the ideas, and algorithms in the code then, as opposed to a copypaste, without asking specific permission from the author, correct?I would assume the papers are published/talks given to spread and encourage the use of the ideas within?Also, I see many people describing people's own implementations of both these among others. Countless google hits for each. So this is legal?
lucid
@lucid Just because other people do it doesn't mean it's legal.
waiwai933
Yes, reusing the ideas is legal. Presuming there aren't patents involved, anyway, and there's no good way to find out if that is the case.
Andrew McGregor
+1  A: 

Whenever you receive code for academic /personal uses it must stay within those boundaries as personal use. You'll need consent from the owner of the code before you can redistribute it under your own name.

ThatMacLad
+1  A: 

This is a complicated, fraught area of the law. Generally: don't assume anything about the intent of published content, without verifying it with the authors.

In general, pure ideas can't be copyrighted, They can be patented, with some constraints - you are supposed to be able to patent only inventions, but the line between the two is fuzzy in the world of software. The line between an idea and copyrightable content is also fuzzy. Lawyers have argued the points for centuries; you won't get a sharply-defined answer here.

You are correct that algorithms are frequently copied and shared online. Many published authors, I'll bet, are just fine with this. This doesn't imply that it's legal, and having being "probably legal" won't protect you from lawsuits and cease-and-desist orders (the biggest risk when it comes to copied code - you're not going to jail, but you or your employer may end up owing some money). My employer frequently requires explicit licenses for all non-original code, for preemptive protection against legal claims.

I don't mean to scare you; just be aware that the law around this is not as free-as-in-information as it would at first appear.

Michael Petrotta
+2  A: 

I suppose my followup question is, it must be legal to use the ideas, and algorithms in the code then, as opposed to a copypaste, correct?

Ideas are not copyrightable or patentable, and algorithms should not be either. However, in some legal jurisdictions, it is currently possible to patent a software "invention" which in practice is just an algorithm implemented on a computer. (Yes, I know it is illogical ...)

So, the fact that an algorithm is published does not make it entirely safe to use it.

Worse still, asking the paper's authors for permission is not enough to address patent concerns because he/she may not be the patent owner, or even aware of the existence of the patent.

[How can the paper authors not know about the existence of a patent?

  • If "invention" was patented before the paper authors wrote their paper, and the authors may have not been aware of it. Academics don't do patent searches. It is too hard, too expensive, and simply not expected of them.

  • The "invention" may have been patented after the paper was published. In theory this should not happen because the paper should be considered as prior art for the "invention", and should render it unpatentable. In practice, the USPTO (in particular) are not diligent in searching for prior art, and often grant patents for "inventions" that are not original.

Anyway, unless an academic paper author is an "inventor" of the patent, there is no reason he or she should be aware of the patent.]

But if you worried about software patents, you'd never write a single program.

I would assume the papers are published/talks given to spread and encourage the use of the ideas within?

An idealist would assume that. In practice, a significant proportion papers are actually written to further the careers of the authors. Large numbers of published papers for academics helps to get promotion / tenure and helps to bring in more research grants. A lot of academics will game the system by publishing stuff of questionable value.

Stephen C
+1  A: 

The best way to find out is to ask the author of the paper for a permission.

When I write articles for my blog (or even academic papers), I do that with the intention to make the source code available for any use (unless explicitly stated), however this is just my personal approach. Anyway, when I receive a polite email asking about license for some code I wrote, I try to promptly answer.

Legally, the question is probably horribly complicated, but morally, sending a quick polite question to the author is the best thing to do (in my opinion).

Tomas Petricek
+1  A: 

I've released source code accompanying a SIGGRAPH paper in the past, and I can tell you that unless it comes specifically with a permissive license, it is not legal to use the code. You'll need to get explicit permission from one of the paper's authors.

Your best bet is to contact the author directly. Do not get the university involved if at all possible -- doing so is a rookie mistake. If they get wind that someone is interested in the code for commercial purpose, expect to spend months negotiating an expensive license with their tech-transfer lawyers.