Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Karl King

macrumors newbie
Original poster
Jul 1, 2013
8
0
Hey guys,

What are the rules of using code that you find on the internet on sites such as this or on tutorials? I am not talking about copy/pasting every single line but taking snippets from here and there, so to speak. Also, I am primarily referring to code regarding basic game development such as character movement, parallax scrolling, menus and game over screens, etc. Is it legal to use this code (especially for commercial purposes), or does it depend on whether or not the owner specifies the right to reuse said code? I don't want to use anything that I should not be using, but I am very new to coding and there are things that I have found easy solutions to online that I otherwise would not have known how to properly code entirely on my own at this point.

I am imagining it depends entirely on the source and whether or not the owner allows this code to be reused, but I didn't know if there is more to this based on common law, public domain, or other laws.

Thanks again guys.
 
I am imagining it depends entirely on the source and whether or not the owner allows this code to be reused,

Pretty much this I would say. Depends who is providing the code and what permissions they give.

In most cases if the code is on a public forum, or site - I don't think the owner cares that much about who uses it.

Just ask first.

Alternatively - look at their code and see how you can improve on it. Should bring your skills up.
 
Thank you very much, and that is what I thought. I am trying to learn coding in C and Objective C for iOS Development a little at a time and I know it is not probably the easiest language to start with, but I am devoted and a fast learner. Also, I don't want to put together apps by just "stealing" code from all over the internet if I can help it, but my main reason for asking was that I have found and saved some good lines of code that solve problems I might not have figured out on my own since I am still in such an early stage of learning. I know it won't be easy-and I don't want it to be-but I am thankful for sites like this that seem to be very helpful and actually pretty friendly to newbies like myself.

Thanks again!
 
I have never hesitated to use code I find if it does exactly what I need.

I would say that if you want code to not be shared, you should make sure that the only people who ever see it have to sign an NDA and understand the consequences they'll face if they ever share it with anyone. (Although I feel like for most people, enforcing an NDA would be all but impossible.)
 
Thank you very much, and that is what I thought. I am trying to learn coding in C and Objective C for iOS Development a little at a time and I know it is not probably the easiest language to start with, but I am devoted and a fast learner. Also, I don't want to put together apps by just "stealing" code from all over the internet if I can help it, but my main reason for asking was that I have found and saved some good lines of code that solve problems I might not have figured out on my own since I am still in such an early stage of learning. I know it won't be easy-and I don't want it to be-but I am thankful for sites like this that seem to be very helpful and actually pretty friendly to newbies like myself.

Thanks again!

For what it's worth...just a quick complement for caring enough to take care not to "steal" someone else's work.

Nice to see that concern for others hard work and ethical behavior are not dead.

Made my day...:D
 
For what it's worth...just a quick complement for caring enough to take care not to "steal" someone else's work.

Nice to see that concern for others hard work and ethical behavior are not dead.

Made my day...:D

That's how I feel. I know a lot of you guys have spent years-and even decades in some cases-gaining the skills and knowledge in programming that you have earned through tons of hard work. Who am I to come along and ride anyone else's coat tales? I want to learn programming the proper way, but I have no problem using a few shortcuts here and there. :D As long as it is ethical to do so.
 
That's how I feel. I know a lot of you guys have spent years-and even decades in some cases-gaining the skills and knowledge in programming that you have earned through tons of hard work. Who am I to come along and ride anyone else's coat tales? I want to learn programming the proper way, but I have no problem using a few shortcuts here and there. :D As long as it is ethical to do so.

If it was posted in a forum in answer to a question,
or made part of a tutorial, then the code is really there to be used.
If someone wrote something and put their name on it, it's probably time to ask to use it.
 
If the code has a commercial license or a restrictive license containing the letter G, you might want to read and comply with the license, as people who apply these restrictive licenses have been known to pursue legal action.

For snippets of a couple lines from other sources, it's likely way too difficult to prove originality, copying, and not fair use in a lawsuit against you.
 
One thing you may want to bear in mind. Most "serious" free code (i.e. licensed open source projects) come with the strict conditions that:

a) If you use their code, then your own code has to be open sourced and available for others to do the same

b) You should contribute any improvements or additions back to the original creator.

If it's just a small app project (b) isn't so important because you're unlikely to produce any changes of significance. But (a) is, and needs to be adhered to.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.