Copying code

edited February 2015 in General Discussion

Is copying code illegal, and if not is it still distasteful to do? I'm new to processing and I was wandering if it was bad to copy bits of code to put in your own. Thank you!

Comments

  • Is copying code illegal

    Provided you meet the requirements of any license agreement then the answer is no.

    and if not is it still distasteful to do?

    Only if you present the code as your own work. If there is no license agreement and no way of contacting the author and you have used the code unaltered or with minor modifications then I suggest that you identify when and where you got the code from.

  • @quark if the code is altered, or implemented into other code, is it? By that I mean the code will be different in some ways, and it won't be in the same order.

  • Answer is based on there being no license agreement.

    By that I mean the code will be different in some ways, and it won't be in the same order.

    It is unlikely that the code you are copying will work unchanged in your own program. At the very least the variable names would have to be changed.

    If in doubt the a simple comment in the source code would be enough e.g.

    // The following function was adapted from code at
    // http://www.codeforall.co.uk/sorting/index.html
    public void doThisForMe(){
    
    }
    

    If your program is part of an academic assignment then you MUST check with your tutor what is expected because they might want full citations and/or a bibliography.

Sign In or Register to comment.