[QCLUG] The Coding Ethics of Copy and Paste

Tim Shearouse t.shearouse@gmail.com
Fri, 12 Feb 2010 12:44:05 -0600


---------------------- multipart/alternative attachment
It depends on the extent of the code I'm taking.

If it's just a few lines, I will probably copy and paste (and then change
the formatting and variable names to match my coding style). Whether this i=
s
legal without an explicit license or waiver I have no idea, but I think it
is intuitively clear that someone writing a how-to article and posting it
online for anyone to view intends for the general public to use the code he
posted as part of the how-to.

If it's a well developed program, or a large subroutine, I have a number of
issues with copy/pasting it:

   - Someone put significant time and effort into it, and if it's not clear
   whether they meant for it to be public I'm going to assume they did not =
mean
   it to be reproduced.
   - I don't know the talent level of the person who wrote the code. A few
   lines I can analyze pretty well, but by the time I've looked through a l=
arge
   set of functions to be sure everything seems to be coded properly and th=
ere
   are no variable name conflicts, I might as well have written it myself.
   - Even if the author of the code is a highly skilled programmer, there i=
s
   no guarantee that their code will not have naming conflicts with the res=
t of
   your code. There may also be assumptions written into the code that you =
are
   not prepared to handle, or it may lack assumptions that you want to asse=
rt.
   - If you need to edit the code you just pasted in, you first need a
   strong understanding of how the pieces fit together, what functions call
   which other functions, etc. This goes back to the "I might as well write=
 it
   myself" line, except here it is to save time in the long run instead of =
the
   short run.

Customizing an open source application for a client is another issue
altogether, so I won't get into that. You can see most of my concerns are
over the practicality of using other people's code more than the ethics of
it. *Shrug* I guess I'm just too ingrained with a "if you want it done
right, do it yourself" attitude.
-Tim

On Fri, Feb 12, 2010 at 12:30 PM, David Hinkle <hinkle@cipafilter.com>wrote=
:

>  Ok, so here=92s the discussion:
>
>
>
> You need to write some code that does some simple something you=92ve neve=
r
> done before.   (For the sake of example:  Sending an email with an
> attachment from PHP).  So you google it, find a helpful blog with an arti=
cle
> about how to send an email with an attachment.  The short article include=
s
> some explanation about how this works and includes a short, 10 or so line
> example.
>
>
>
> There is no explicit license or release on the website because it=92s jus=
t
> someone=92s blog.
>
>
>
> Do you feel comfortable copy/pasting his example code and editing it to d=
o
> your bidding?  Or do you feel that it=92s a no no?
>
>
>
> Legally speaking, the issue isn=92t clear.   Code has to be expressive to=
 be
> copyrighted.   For example, there is precedent that you can=92t copyright=
 a
> header file that only defines well known constants.  On the other hand, a=
ny
> expressive work automatically gains copyright as soon as it=92s written a=
nd
> the only way to find out otherwise is to litigate over it, but in theory =
a
> completely functional piece of code with no =91art=92 so to speak isn=92t
> copyrightable.   Then of course there is the implied consent issue in
> regards to the article on the blog itself.
>
>
>
> Of course, some guy with a blog you=92ve never probably isn=92t going to =
be
> suing you for copyright infringement for copying his 10 line snippet.  An=
d
> the government is not likely to correct the grey area mess that is copyri=
ght
> law anytime soon.
>
>
>
> In academia, in regards to the written word which copyright was originall=
y
> designed to protect , the copy paste of a single sentence is often
> considered plagiarism if it goes undocumented.   But what about in
> programming?  Where =93a =3D a+1=94 and =93b=3Db+1=94 are equivalent, and=
 only the
> variable names have been changed to protect the guilty?
>
>
>
> But we=92re not lawyers, and we=92re not academics.   So let=92s not disc=
uss the
> legal implications.    Let=92s discuss how you feel about it.   Do you fe=
el
> it=92s kosher?  Do you feel it=92s wrong?  If the guy sitting next to you=
 did
> this would you feel =91business as usual=92 or would it be something you =
go to
> the boss over?  I want to know more about the community standards on this
> issue.
>
>
> David
>

---------------------- multipart/alternative attachment
An HTML attachment was scrubbed...
URL: http://qclug.org/pipermail/qclug/attachments/d2c8ce39/attachment.htm

---------------------- multipart/alternative attachment--