Jump to content
  • Advertisement
Sign in to follow this  
Solid_Spy

What counts as "Code Plagiarism"?

This topic is 2053 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have been learning game development and programming in C++ with OpenGL for about a year and a half, and one of the things i've always worried about is whether or not I might end up "plagiarising" while programming. Sure, I haven't released anything yet, and probably won't for YEARS, but i've always been worried about whether or not I could end up "accidentally" plagiarising.

 

I mean I'm, let me put it this way. My conscience, is pretty much existent, to put it plainley, and I most Certainley do NOT want to create my ultimate "Dream Game", and live my life as a fraud telling everyone that I programmed the game all by myself, even if I plagearized without even knowing it.

 

like for example, I've decided to VOW to NEVER, EVER, Copy and Paste code. I never do it, unless it is my own, and in my own words. However, could it still be plagiarism regardless?

 

Like, lets give a silly example:

 

Lets say i'm using a Graphics API, and I forgot the name of the initialization function, and whether or not it is camel case or not.

 

I look up on the internet (Stack Overflow), and someone shows in an example that it is:

GEngine * gEngine = new GEngine();
EngineDesc engineDesc = new EngineDesc((*void)0, false, true, true, NULL);

What i will generally do is type the code out into my engine, and change the name to my own, as well as look at the function to see what it does exactly, but is this enough? I know it sounds like a silly question, I mean I might know what the first Line of code means, but what about the second one? I might not even know what the parameters are for, but i'll use the function anyways, and it will make the Graphics Engine work regardless. If I type it in and I don't know what it does (E.G. Don't research the whole function), would that count as plagiarism?

 

I know it sounds like i'm being REALLY overreactive about this, but I feel like this is really is a pressing issue for many programmers who may also struggle with this (irrational?)fear , and I don't want to fall into the trap of being the "programmer who says he made his own game engine, when he really just plagiarized many other peoples original code".

Edited by Solid_Spy

Share this post


Link to post
Share on other sites
Advertisement

Unless there's a lawyer aboard here on gamedev, you're probably not going to get responses that will stand up in court. However, there are things you can do, such as look for copyright claims in the documents you read, the sites they're are posted to, etc. You can also look at documentation for any APIs you use. E.g., go to the OpenGL site and look at their license.

 

FYI, from circ61.pdf, Copyright Registration for Computer Programs. www.copyright.gov:

Copyright protection is not available for ideas, program logic, algorithms, systems, methods, concepts, or layouts

I am not a lawyer so I won't attempt to interpret that for you. For my own use, I wouldn't lose any sleep regarding variable names or snippets. I'd like to see someone try to copyright "float f" or "int i"

Edited by Buckeye

Share this post


Link to post
Share on other sites

FYI, from circ61.pdf, Copyright Registration for Computer Programs. www.copyright.gov:

Copyright protection is not available for ideas, program logic, algorithms, systems, methods, concepts, or layouts

I am not a lawyer so I won't attempt to interpret that for you. For my own use, I wouldn't lose any sleep regarding variable names or snippets. I'd like to see someone try to copyright "float f" or "int i"

I'm not a lawyer either, but I do know that there are Patents out there regarding certain algorithms, especially Encryption algorithms, and Global Illumination in Computer Graphics.

Edited by Solid_Spy

Share this post


Link to post
Share on other sites

I agree with Buckeye, however, I live by a moral code of not typing a single line unless I know EVERYTHING that it does. I do not write code until I understand every aspect of it.

Share this post


Link to post
Share on other sites

I agree with Buckeye, however, I live by a moral code of not typing a single line unless I know EVERYTHING that it does. I do not write code until I understand every aspect of it.

Yeah, Thats kind of something i'm thinking of doing by default. I mean, it's probably the best i would be able to do anyways. I can't just memorize every single line of code and all it's parameters (thank GOD for intellisence), so I guess this would be the best option.

Share this post


Link to post
Share on other sites

I am no lawyer either, but I think you can safely assume that constructs that are in widespread use, at least are safe.  Once, even simple things like XOR-ing the mouse cursor on a monochrome image was once patented.  I think it was Xerox, who owned that patent.  GIFs were patented once too, but luckily patents expire eventually.  For more advanced (modern) algorithms, however, I would make sure it is not patented.

 

(Honestly, I wouldn't bother as long as I were inventing the algorithm myself, accidentally violating a patent.  There are too many patents to check to be sure you are not violating any patents anyway, but I would never do on purpose.  I know this may be ill advised, so do as I say, not do as I do, if you want to stay safe.  I might change my mind after reading the other answers you get in this thread...)

Share this post


Link to post
Share on other sites

I'm not a lawyer either, but I do know that there are Patents out there regarding certain algorithms, especially Encryption algorithms, and Global Illumination in Computer Graphics.


Maybe I'm wrong, but I don't think you were looking for legal advice or advice regarding patent violation.

Plagiarism is a concept that exists separate from copyrights, patents, and other legal constructs. Even if it was totally legal to copy other people's code line-by-line without ever mentioning the source, it would still be plagiarism. Quoting whoever wrote this for Wikipedia: "Plagiarism is not a crime per se but in academia and industry it is a serious ethical offense, and cases of plagiarism can constitute copyright infringement."

If you're writing code all by yourself as a hobby, it's up to you to set your goals for what you want to get out of programming. If you just want to put something together to see it work, I wouldn't worry much about copy-and-paste or starting with whole files from the Internet. If it's something you want to make public in some way, that's where the legal issues start to pop up. If you're going to put this on a resume, and claim you implemented whatever you copied out of some tutorial, you better be able to answer questions about the algorithm, but the API probably won't come up. And, if you're copying stuff for your job, be prepared to be fired for not submitting original work whenever someone catches on.
 

What i will generally do is type the code out into my engine, and change the name to my own, as well as look at the function to see what it does exactly, but is this enough?


It depends. If it's really just one or two lines, and the only real problem to solve was looking up the API, sure, it's enough. However, I'd expect a professional programmer to know how to look up this information in the API documentation instead of getting some random code off the Internet. In a code review I'd ask what all the arguments do. If your answer is that it was like that on some website you copied, you don't really have to worry about immediately losing your job, but you're performance review is going to mention that you willingly submit code that you don't even understand. Meanwhile, no one is going to care about whether a variable name was renamed or not, unless you violate some naming convention.

Hypothetically, if you were working on a game and submitted a whole new class of a few hundred lines or more, and somebody recognized it as being the same thing as some class out of an open-source project, except with different comments and variable names, no, it was definitely not enough.
 

I don't want to fall into the trap of being the "programmer who says he made his own game engine, when he really just plagiarized many other peoples original code".


IMO, you're rationalizing being one of these guys. If you really wanted to make your own engine, you should be able to get by referencing algorithms, math, APIs, etc. - without needing to look up online which actual arguments to pass to which functions. Edited by Pink Horror

Share this post


Link to post
Share on other sites

 

I don't want to fall into the trap of being the "programmer who says he made his own game engine, when he really just plagiarized many other peoples original code".


IMO, you're rationalizing being one of these guys. If you really wanted to make your own engine, you should be able to get by referencing algorithms, math, APIs, etc. - without needing to look up online which actual arguments to pass to which functions.

 

 

Everyone is learning at some point, even professionals.  Eventually you get better at what you are doing.  Sometimes looking at examples can help clearing up things that are not always easy to grasp.  I am sure everybody does it.  Not saying you should just cut and paste.  You should still write your own code, but looking at other code is healthy and makes it easier to clear up things that may not be so clear from teaching books or documentation.

 

Edit: On the other hand, what is so bad about citing your sources?  There is a lot of products in use today that has an "endless" list of legal stuff for using other people's "stuff".  If you have an iPhone, for instance, have a look at "Legal Notices" in Settings -> General -> "Legal Notices".  Spotify: Help -> Show Licences. 

Edited by aregee

Share this post


Link to post
Share on other sites

I was reading about this on Friday. If you want to avoid copyright infringement you need to do the following:

 

1) Get a team to look at the API and write a specification document

2) Get lawyers to look over document for any patent/copyright infringements

3) Get a completely different team to implement the specification knowing nothing about the original implementation.

Share this post


Link to post
Share on other sites

Just as a note, copying things from stackoverlflow.com is perfectly safe, since everything you share there get  Creative Commons Attribution Share Alike license

 

I'm sure most sites like it works similarly

 

Fully understanding any code you include in your project is of course a good idea in general :)

Edited by Olof Hedman

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!