Fog Creek Software
Discussion Board

Open and Closed

Here's a tricky problem. Let's say that in my spare time I read some open source software and I spot a tricky algorithm that I really like.

When I head back to my job, maybe one day I'm faced with a task that would be perfectly solved using the ideas behind that algorithm. So I incorporate it into my company's software. I don't use any of the actual code from that original open source project. I rewrite the entire thing not based on my memory of the code, but on my memory of the concept of the algorithm.

Am I breaking violating the license agreement of the open source code that I read? Are the concepts behind the open source project protected by the license, or just the actual code? What if my commercial project uses an entirely different programming language than the original?

Benji Smith
Friday, March 22, 2002

Depends if you're standing on US soil or not.  Algorithms are discoveries not inventions, except in the US.  The actual text, the code, is copyright.  Remembering how some piece of code works and re-implementing it yourself isn't (in my ever so hedged and disclaimed from any liability of you depending on it point of view) a breach of copyright.

If possible though at least credit the original author with the idea in the code.  If its in a liberal open source licence (ie not GPL) then include it as a separate source file with the licence intact for that source file.

Simon Lucy
Friday, March 22, 2002

Actually, the terms of the GPL and LGPL do not allow you to merely put it in a file. The LGPL lets you put it in a dynamic lib (dll). But if its GPL, you can't take the code.

Now, imho, there is NO possible OSS author that would object to you using his/her algorithm, most especially if you gave credit. Your bigger problem I expect will be YOUR legal department. :) Only a few bitchy corporations have ever sued for algorithm stealing, iirc :)

Anyway, read the relevant license.

Mike Swieton
Friday, March 22, 2002

Here is a programmer's understanding.

Licenses like the GPL derive their strength from copyright law.  The problems concerning use of algorithms stem from patent law. 

Therefore there is no problem, unless there is also a patent on the algorithm.

Arthur Vandelay
Saturday, March 23, 2002

>So I incorporate it into my company's software. I don't use any of the actual code from that original open source project. I rewrite the entire thing not based on my memory of the code, but on my memory of the concept of the algorithm.

Benji, I think, there is no law in the world that could stop you from doing so. And even if there were: no one will notice what you did, either. Anything you learn (and reading an algorithm and remembering how it works is a way of learning) is in your head. You cannot forget it, even if you tried.

If you kind of feel bad for using someone else's idea, try to come up with some ideas of your own and commit them to the world wide pool of knowledge to make up for it :-)

At my first job they actually made me sign a contract saying that I was not allowed to use the knowledge I gained working for that company anyplace else. I found that ridiculous, but signed anyway. How do they think they can find out what I learned where? Once knowledge is in or head, you cannot avoid using it. Even if you use it to come up with an alternative solution, to avoid using this bit of knowledge, you are already using it.

Be fair, try to give credit to people who helped you coming to your solution, offer your ideas and solutions to others and I think everything will be fine.

Have fun,

Jutta Jordans
Monday, March 25, 2002

Another allegory from the music industry. Not sure how it might apply.

You can copyright a song but that's no gaurantee it won't get stolen. You can sue, but juries tend to be star struk and if Puff Daddy/P-Diddy stole your song they might rule in their favor because he has bigger lawyers than you, and he's famous.

Some artists are famous for settling out of court - they'll steal a song make millions from it and throw a few thousand at the person who wrote the song to keep them from taking their lawsuits to court. Music lawyers tend to know whose these people are and will advise you accordingly.

George Harrison caught an idea for a song from somewhere else, was sued and lost. His defense was "sometimes something gets stuck in your head and you don't know where it came from." This is one of those cases where honesty lost where dishonesty, unfortunately, would've benefited George more... though I'm sure his conscience is clearer for being honest and giving the proper author credit and money.

To quote someone "You're only breaking the law if you get caught."

I'm not a laywer and this is definately not legal advice, and if you thought any of it was advice you're wrong. These are just stories, some might even be incorrect.

Mark W
Tuesday, March 26, 2002

I think you will find that you are OK to
put the algorithm in your code, provided you don't copy the code.

Algorithms, I believe, can only be patented, and are only protected if a patent is specifically applied for. (Like LZW). Copyright exists without the user having to register.

If the algorithm was patented, then the original GPL programmer was breaking the law.
(unlikely - patenting is expensive and not worth it for most algorithms). Either way, you are not violating his or her copyright.

David Clayworth
Tuesday, March 26, 2002

*  Recent Topics

*  Fog Creek Home