Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

The "scope" of the GNU license is troubling me : I know it has been answered many times ( here, here, ... ) but shouldn't we take into consideration the complexity and originality of a code before using GPL license ?

I explain : I'm working on a pet project using the DTW algorithm that I have written in C using the pseudo-code given on the wikipedia page .

At one point I decided to change it for a C++ implementation ( just for hone my c++ skill ) . After doing so, I've looked for an existing implementation on the web, to compare the "cleanliness" of it, and I found this one : Vectored DTW implementation, which is part of limproved, a C++ library licensed under GPL v3 .

Personnally, I don't mind the GNU license because it is a personnal project, which will never led to any kind of commercial purpose, but I wonder if this implementation can abide a company using it to open their code ( and other FOSS permissions ).

Theoretically, I think it can ( I may be wrong :p ), but the algorithm in question is so simple (and old) that it should not.

share|improve this question
2  
As far as I understand, you can't copyright or patent an algorithm, only copyright the exact code implementing it, or patent a solution using it. –  Lattyware Oct 29 '12 at 14:21
    
@Lattyware someone apparently has patented double buffering way back in the past when it was commonly used, but still relatively new... in this day and age you can patent almost anything, it just might not hold up in court.. Oh and also someone patented the method of making toast. If you're going to worry about patents though, find a new career until all that gets reformed –  Earlz Oct 29 '12 at 14:39
    
@georgesl: If it's that simple, just write it yourself. If that's too hard, it obviously isn't that simple :) –  Brian Oct 29 '12 at 15:12
    
The GPL doesn't have anything to do with code complexity. "I wonder if this implementation can abide a company using it to open their code" -- It's up to the company to decide if that tradeoff is worth it. –  Robert Harvey Oct 29 '12 at 15:43
add comment

2 Answers 2

up vote 2 down vote accepted

If it does not exceed the threshold of originality, it cannot be copyrighted. Thus, the GPL (or any other license) might not apply to simple or obvious pieces of code.

Whether a particular piece of code exceeds this threshold or not is up to the judges to decide. Personally, I don't think the "obvious" translation of some algorithm to some language X requires enough creativity to be copyrightable, but I'm not a lawyer, so my opinion does not count here.

share|improve this answer
    
Oh I didn't know such notion existed ! –  georgesl Oct 29 '12 at 17:32
add comment

If I understand you.
You have implemented an algorithm after studying the source of an (L)GPL implementation ?
And your question is - is your own implementation now a derived work of that implementation - and so subject to the (L)GPL?

Basically it's a legal, rather than a licensing, question. Is your implementation the obvious simple way to do it - and so is the same as the GPL source simply because they also used the obvious simple way to do it. Or do they have a clever, novel way of doing it which wasn't at all obvious to you until you saw their work?

Since it's in GPL code it is unlikely to be patented by the author (although the algorithm may have been patented by somebody else without them knowing). It remains their copyright - but that only covers the actual implementation, ie the exact choice of variables etc. Copyright doesn't normally cover the algorithm ( whatever the authors of Numerical Recipes claim).

The minimum you should probably do (for the good of your programming soul) is to understand the algorithm from their code, then put away their code and write your own from scratch.

If it's simple enough that you can just look at it and write it later from memory - then it's probably a trivial algorithm and that is the obvious way to do it. If you need to copy it directly from the source then it's probably a sufficiently novel invention that it deserves some protection.

share|improve this answer
    
It's actually the other way around ! I've implementing the algorithm from scratch using the obvious way as you said, and I noticed same somebody has already licensed it under LGPL ( the licensed implementation does not add any improvement from the basic method IMHO). –  georgesl Oct 29 '12 at 17:22
1  
Then you are fine! Unless the other guy is Apple/Oracle/Microsoft ! –  Martin Beckett Oct 29 '12 at 17:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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