Sign in to follow this  
ryan mccabe

Indistinguishable copy-pasta usage

Recommended Posts

ryan mccabe    161
Before I delve deeper into coding a basic framework I want to know where I need to be concerned with the law and posted code. First off, anything I do in regards to this question will be closed source. I wouldn't take code for a final product, like a sprite engine or planet generation, and use it without first asking and second making it my own (output something inline with my own style). But I'm fuzzy about things that work behind the scenes. If my code for path-finding in a homing projectile was from a snippet am I plagiarizing? There are only so many ways to do it, no one is going to get the code from me, its indistinguishable from any other method, so wouldn't saying the code belongs to someone be like saying a math function is copyright? Then again maybe there are copyright math functions, I don't know (theoretically I find the notion of copyrighting math absurd, although credit should be given to those who discover such functions).

If I cant use someone else's code for homing then how do I rewrite it so that I can. Writing essay in uni you put things in your own words to avoid issue. Do I need to re-code in my own code style? Is reworking the code to fit with my works naming and structure enough to claim it as my own?

I don't want to put something into my baby engine only to find out that when its grown to something substantial I have to hack out some object.

I don't mind asking to use code and regardless of the answer here I will, but I would like to be clear on the details. Also, I don't have any code in mind the homing code is purely hypothetical and was chosen for this reason.

Thanks,
Ryan

Share this post


Link to post
Share on other sites
smart_idiot    1298
You are free to re-implement an algorithm on your own, assuming it's not patented.

If you outright take someone's code and modify it, then its a derivative work, covered under copyright law, and the parts you didn't write yourself remain under the copyright of the original author.

I should also add that it extends to more than just the raw bytes. Even if you rename all the variables and reformat all the white space, that's just a transformation. Even though none of the bytes match, it's still the other persons code, in the same way that tinting the Monalisa purple wouldn't create a new and original painting even though the new painting contains none of the colours of the original.

If you use someone's code, what you do depends on how its licensed.

If it's public domain, then you're free to do whatever the heck you want with it.

BSD and MIT licenses generally will let you use their code for pretty much anything as long as you keep any copyright notices intact.

GPL is a lot more restrictive, in that if you release something using it, then you're obligated to release any GPL'd code along with it, and any modifications you make to to the GPL'd code must also be covered by the GPL and thus released also.

End users must also have the freedom to modify the GPL'd portion of the program, which is a big problem if your project is closed source as that normally requires recompiling it.

LGPL code is similar, except that you're allowed to link the LGPL'd code with your non-LGPL'd code. End users are then free to modify the libraries used by your closed source program and everyone is happy, again, as long as you don't modify the LGPL'd code in anyway, as your modifications are required to be under the LGPL and thus must be released with your program.

Lastly, IANAL, so don't assume anything I've said is true.

Share this post


Link to post
Share on other sites
ryan mccabe    161
This is going to sound pretty vague and hard to answer but here goes: what would constitute re-implementing something like [url="http://www.flipcode.com/archives/Perlin_Noise_Class.shtml"]this[/url] perlin noise function? I ask because reimplementing most things seems like the way to go.

Share this post


Link to post
Share on other sites
Domx    159
[quote name='ryan mccabe' timestamp='1302941796' post='4799065']
This is going to sound pretty vague and hard to answer but here goes: what would constitute re-implementing something like [url="http://www.flipcode.com/archives/Perlin_Noise_Class.shtml"]this[/url] perlin noise function? I ask because reimplementing most things seems like the way to go.
[/quote]

Coding your own solution on the basis of functional requirements of the source solution. You need to establish what source code does and if it does X, you need to write a function/program/code snippet that also does X, in a similar (or not) fashion, without copying/pasting any sample code. I guess your concern is that even though you wouldn't copy any part of source code, you might still end up coding it in a way that makes it look like it was copied from the sample? Don't worry about that, there is a limited number of ways to achieve certain things and this is further limited by common preferences (due to various factors). There are only oh-so-many ways to implement a linked list and no one is going to shoot you for having a similar solution for it, as the one used in 389202 other applications.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this