Jump to content

  • Log In with Google      Sign In   
  • Create Account

What counts as "Code Plagiarism"?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 Solid_Spy   Members   -  Reputation: 420

Like
1Likes
Like

Posted 23 February 2014 - 02:43 PM

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, 23 February 2014 - 02:48 PM.


Sponsor:

#2 Buckeye   Crossbones+   -  Reputation: 4902

Like
2Likes
Like

Posted 23 February 2014 - 02:59 PM

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, 23 February 2014 - 03:00 PM.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.


#3 Solid_Spy   Members   -  Reputation: 420

Like
0Likes
Like

Posted 23 February 2014 - 03:03 PM

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, 23 February 2014 - 03:05 PM.


#4 sethhope   Members   -  Reputation: 420

Like
3Likes
Like

Posted 23 February 2014 - 03:04 PM

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.


I develop to expand the universe.
"Live long and code strong!" - Delta_Echo (dream.in.code)

#5 Solid_Spy   Members   -  Reputation: 420

Like
0Likes
Like

Posted 23 February 2014 - 03:12 PM

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.



#6 aregee   Members   -  Reputation: 1022

Like
1Likes
Like

Posted 23 February 2014 - 03:22 PM

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...)



#7 Pink Horror   Members   -  Reputation: 1201

Like
1Likes
Like

Posted 23 February 2014 - 04:20 PM

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, 23 February 2014 - 04:24 PM.


#8 aregee   Members   -  Reputation: 1022

Like
1Likes
Like

Posted 23 February 2014 - 04:29 PM

 

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, 23 February 2014 - 04:45 PM.


#9 Paradigm Shifter   Crossbones+   -  Reputation: 5370

Like
2Likes
Like

Posted 23 February 2014 - 04:39 PM

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.


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#10 Olof Hedman   Crossbones+   -  Reputation: 2823

Like
2Likes
Like

Posted 23 February 2014 - 05:13 PM

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, 23 February 2014 - 05:15 PM.


#11 Pink Horror   Members   -  Reputation: 1201

Like
1Likes
Like

Posted 23 February 2014 - 07:40 PM

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.


I'd prefer for someone to directly copy and then cite the source vs. copying and trying to modify the code so it doesn't look like the source any more. If you copy something and cite the source, it's not really plagiarism any more, because you're not attempting to make it look like your original work.

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


If you copy code, it can be "perfectly safe" from any copyright concerns and still be plagiarism.

#12 frob   Moderators   -  Reputation: 21151

Like
2Likes
Like

Posted 23 February 2014 - 07:43 PM

Moving to business forum.

Plagiarism is a concept in school, so ask your teacher about the policies. In the rest of the real world, it is copyright that concerns us.

Not a lawyer but someone who asked basically the same question to a lawyer...

Copyright is about people and organizations attempting to protect valuable content they have created.

When you get helpful content from a book, website, or other source designed to educate people, double-check the license for the site and content. If the code sample specifically states a copyright notice, such as GPL or BSD or other similar license, follow it. Otherwise use your brains.

When you buy a book or visit a help website, consider: Are they attempting to protect that valuable content? Or are they publicly speaking the content with a clear intent that it be shared and used elsewhere?

There are four factors that go into copyright claims: Purpose and character, nature of the work, substantiality, and effect of the use.

In your case the purpose and character of the original work was to educate people about how to use a concept, the nature of the work has transformed from educational material to a game, the published game might use the entire concept taught but that piece is a tiny part of the game, and the effect of using it in your game is not going to alter the value of the material as it exists in the book or web site.


Unless copyright is specifically claimed in the code sample, it is generally safe to include source code snippits found on educational and tutorial web sites as a small part of a larger product. However, if it specifically does include a notice (like the GPL or BSD license that require every source file be properly marked with a copyright notice) then that applies instead.
Check out my personal indie blog at bryanwagstaff.com.

#13 bschmidt1962   Crossbones+   -  Reputation: 1832

Like
0Likes
Like

Posted 25 February 2014 - 04:53 PM

 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

 

I'd like to know where you read that on friday :)..

I've developed software (and music--also great fodder for copyright discussions) for decades, ranging from companies that everyone on the planet has heard of to tiny companies no one ever knew existed.

We never did anything remotely like that "to avoid copyright infringement".  

Step 2) there in particular is massively expensive, and I've never known that to be done as a matter of course.

 

What that does look like is how you might go about reverse-engineering something and be (semi) safe, from a legal perspective (i.e a 'clean room' implementation of an existing piece of software).  I don't get the idea that's at all what the original question was about.

 

Frob (as always) gives great answer.

To avoid copyright infringement, write your own code from scratch.

That said, you can use common sense.  If you look up a bubble-sort algorithm in a common textbook and implement it in 'C, you aren't infringing on any copyright.

if you look up something on StackExchange, etc, use it is a reference.  If there's not much to the code (aside from simply an example of proper coding or API usage), then copying and altering it is almost certainly fine.  That said, don't cut and paste willy-nilly from the internet, unless you are very aware of (and confident in!) the licensees associated with the content.


Brian Schmidt

Executive Director, GameSoundCon:

GameSoundCon 2014:October 7-8, Los Angeles, CA

 

Founder, EarGames

Founder, Brian Schmidt Studios, LLC

Music Composition & Sound Design

Audio Technology Consultant


#14 frob   Moderators   -  Reputation: 21151

Like
1Likes
Like

Posted 25 February 2014 - 07:49 PM

Frob (as always) gives great answer.

Maybe replace 'always' with 'usually'. :-)

I appreciate being put on a pedestal as much as the next person, but believe me, I make mistakes just like everyone. I try to look things up, speak from experience, and explain my thought processes, but there have been times where things I have posted have contained flaws.

I hope people will call it out if they see something wrong with the posts.
Check out my personal indie blog at bryanwagstaff.com.

#15 mdwh   Members   -  Reputation: 873

Like
0Likes
Like

Posted 03 March 2014 - 07:59 AM

If discussing the ethical aspect of plagiarism (independent of copyright issues), one answer is to put a link in the source code to where you found the solution. This is useful for yourself (if looking at it years later, and you wonder why on earth you put that code there, or what it does), and is also indicating to anyone else reading the source that you're crediting your sources.

 

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 smile.png

 

Careful - CC BY SA would require giving attribution. The "share alike" would also require the source code that references the copied source code (and presumably any compiled binaries) to also be under CC BY SA. This would be a pain for commercial users (who presumably don't want their programs to be freely distributable), and also potentially Open Source (since CC BY SA isn't commonly used for source code, so you'd have to worry about compatibility with licences like GPL, BSD etc).

 

If you are using code from elsewhere, in my opinion you should be very careful about what the licence is.


http://erebusrpg.sourceforge.net/ - Erebus, Open Source RPG for Windows/Linux/Android
http://homepage.ntlworld.com/mark.harman/conquests.html - Conquests, Open Source Civ-like Game for Windows/Linux




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS