Searching \ for 'Stealing Code' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=stealing+code
Search entire site for: 'Stealing Code'.

Truncated match.
PICList Thread
'Stealing Code'
1998\02\07@144102 by Charles Laforge

picon face
Hi

I am looking for opinions as to what is right or wrong when it comes to
using code found on the internet.  I imagine people put it there so
others can use it and learn from it but of course I may be wrong.

Please... let me know what you think.

Charles

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

1998\02\07@150837 by Chris Eddy

flavicon
face
Strictly from an ethical point of view, if their name is on it, you really
should ask them.  If their name is not on it, and the code seems to have
gotten out into the public domain without the authors knowledge, don't use
it.  The best answer of all is to study methods and techniques that are
illustrated, and then write your own.  That way it is truly a creation of
your own.

Chris Eddy

Charles Laforge wrote:

{Quote hidden}

1998\02\07@162809 by S.H.S.

flavicon
face
[]  > I am looking for opinions as to what is right or wrong when it comes to
[]  > using code found on the internet.  I imagine people put it there so
[]  > others can use it and learn from it but of course I may be wrong.

Obviously there is no general answer to that. If they don't declare whether the
source is freeware or whatever, and you are unable to ask them, then legally
the code is copyrighted.

1998\02\07@164852 by Morgan Olsson

picon face
At 15:06 1998-02-07 -0500, you wrote:
>Strictly from an ethical point of view, if their name is on it, you really
>should ask them.  If their name is not on it, and the code seems to have
>gotten out into the public domain without the authors knowledge, don't use
>it.  The best answer of all is to study methods and techniques that are
>illustrated, and then write your own.  That way it is truly a creation of
>your own.
>
>Chris Eddy
>
... and that«s the fun! And We also then know everything it does so we
don«t run into trouble.
/Morgan


{Quote hidden}

/  Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \
\  spam_OUTmrtTakeThisOuTspaminame.com, ph: +46 (0)414 70741; fax +46 (0)414 70331    /

1998\02\07@190315 by John Payson
picon face
> I am looking for opinions as to what is right or wrong when it comes to
> using code found on the internet.  I imagine people put it there so
> others can use it and learn from it but of course I may be wrong.
>
> Please... let me know what you think.

I can only speak for myself and hope that others think like me...

I'll only post a piece of code to the net if I'm willing to have others
use it.  In general, I make no guarantees with regard to code snippets I
post; I'll often be rekeying them from memory (faster than clipping them
out of a "real" program that used them and removing or cleaning up any
unsuitable comments [e.g. ones that refer to how other sections may inter-
act with the one in question]); typos are not uncommon.

For major routines like my 16-bit binary->decimal routine I would hope and
expect that anyone posting it to the list would credit me for it.  If the
routine is used within a program that's used or distributed other than via
the list, credit may be given or not depending upon circumstances (some
companies get paranoid if parts of their software are credited to non-empl-
oyees).

For lesser code snippets, it's sometimes harder to determine authorship and
therefore I may most or include them without crediting anybody.  For example,
I unfortunately don't know who deserves credit for the "Most Brilliant Four-
Instruction Snippet" aware which, IMHO, goes without question to the author
of the following code:

       movf    Source,w
       btfsc   C
        incf   Source,w
       addwf   Dest,f

which computes (Dest = Source + Dest + Carry), with proper carry out in all
cases.  I've used that snippet (and variations thereof) many times in may
one code and examples, though I make no claim of authorship.  Similarly, I
have no idea whether anyone else has used either of these two three-instruc-
tion gems before I came up with them:

       btfss   Condition1
        btfsc  Contition2
       whatever

[executes 'whatever' if either condition1 or condition2 is true], or

       rlf     KZ,w
       addwf   Source,w
       addwf   Dest,f

[if KZ is a register that's known to contain zero, this performs an add-with-
carry like the above, except that carry out is not correct.  Once cycle fast-
er though.]

With snippets like the above (esp. the KZ one which I've still very seldom
seen anyone else use) I wouldn't mind credit [e.g. "using John Payson's
KZ trick, we could save a cycle..."] but I recognize that with such a small
number of three-cycle instruction sequences in existence it's hard to be too
posessive.

1998\02\07@231645 by Dwayne Reid

flavicon
face
Hiya John,

>For lesser code snippets, it's sometimes harder to determine authorship and
>therefore I may most or include them without crediting anybody.  For example,
>I unfortunately don't know who deserves credit for the "Most Brilliant Four-
>Instruction Snippet" aware which, IMHO, goes without question to the author
>of the following code:
>
>        movf    Source,w
>        btfsc   C
>         incf   Source,w
>        addwf   Dest,f

I recall both Andrew Warren and Klaus Borchers crediting Frank Testa for
that beautiful piece of work.  Obviously, this is third hand; possibly Andy
can confirm or deny.

Dwayne Reid   <.....dwaynerKILLspamspam@spam@planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, Alberta, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1998\02\08@133434 by Mike Keitz

picon face
On Sat, 7 Feb 1998 21:21:30 -0700 Dwayne Reid <dwaynerspamKILLspamPLANET.EON.NET>
writes:

>>
>>        movf    Source,w
>>        btfsc   C
>>         incf   Source,w
>>        addwf   Dest,f

This code is popular, but incorrect.  It does not generate proper carry
out for the case of source = 0xFF and carry in = 1.  The version above
appears in many Microchip application notes.  John must have [mis]typed
it from memory.  It is suitable for 16-bit adds if the carry out doesn't
have to be correct.  It is not suitble for the "middle" byte additions in
24, 32, etc. bit adds.

The even more brilliant version that does work and doesn't "cost" any
more replaces the incf with an incfsz.  If source = 0xFF and carry in =
1, the add (which would have added zero, which is OK, and cleared C,
which is wrong) is skipped.  Thus, C remains set as it should be for the
next addition.  I think at least one of the later Microchip app notes
presents the latter routine but doesn't credit it to anyone.

Notice that the incfsz routine doesn't set the Z flag properly, because
the add may be skipped.  If you need to know if the result (new value in
Dest) is zero, test it seperately.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\02\08@135057 by John Payson

picon face
> The even more brilliant version that does work and doesn't "cost" any
> more replaces the incf with an incfsz.  If source = 0xFF and carry in =
> 1, the add (which would have added zero, which is OK, and cleared C,
> which is wrong) is skipped.  Thus, C remains set as it should be for the
> next addition.  I think at least one of the later Microchip app notes
> presents the latter routine but doesn't credit it to anyone.
>
> Notice that the incfsz routine doesn't set the Z flag properly, because
> the add may be skipped.  If you need to know if the result (new value in
> Dest) is zero, test it seperately.

I miskeyed from memory.  Thanks for pointing that out.  I meant to use an
INCFSZ which does ingeniously preseve the carry in the case where source=255
and carry-in=1 (it skips the add).

1998\02\09@140716 by John Halleck

flavicon
face
> []  > I am looking for opinions as to what is right or wrong when it comes to
> []  > using code found on the internet.  I imagine people put it there so
> []  > others can use it and learn from it but of course I may be wrong.
>
> Obviously there is no general answer to that. If they don't declare whether
the
> source is freeware or whatever, and you are unable to ask them, then legally
> the code is copyrighted.

 U.S. Code Title 17 (Copyrights)
 Section 405, Paragraph A,
   Lists two different conditions
     Works before we signed the Berne Convention Implementation Act of 1988
     and works after.
     If we assume that the code is after 1998, it is assumed to be have a
     copyright unless assumed otherwise.

 Section 501 covers remedy's... they are affected by whether or not the
 work is registered, and whether there was a notice...


 Yes, you will see all sorts of legally illiterate folk claim that puting
 in on the net makes it public domain, but it aint so.  The newsgroup
 news.announce.newusers used to have (and I assume still has) a regular
 posting from a lawyer (John Barlow?) that debunks that theory.


 Common curtesy would dictate that regardless of the legal niceitites
 you should ask before you use someone else's stuff.

1998\02\09@161319 by William Chops Westfield

face picon face
If you put code on the net, it SHOULD contain a copyright notice and a
statement of allowed usage (see the GNU "copyleft" statements for extreme
examples of conditional usage.)  My usual notice says that personal use
is OK but that I should be asked before it is included in a commercial
product...

Now, if you find code that has such a nice notice, you should follow whatever
it says.  If you contact the owner and they want $10k before you can use
their code, then you can face the moral dilema of whether they're jerks who
deserve to have their code stolen and couldn't prove it anyway...

If code you find that has authorship indication but no terms of use, you
should contact the author before using it commercially.  Personal use would
fall under shareware or freeware terms, if requested.

Code with no indication of ownership or authorship should be treated like
stolen property, a potential exception would be if it's part of a explicitly
public collection (ie simtel20 archives.)

Now, I've been assuming that the code people have been posting to the
PICLIST as part of the coding contests and whatnot has an implied "anyone
can use this for anything" clause in it, subject to possible modification by
a notice in the file for those cases where files are offered for ftping or
private email.  (Ie, a full I2C library is a potentially valuable thing, but
I wouldn't expect someone to say "here, I have one and I'll mail it to you"
and then be able to say "oh by the way, that'll cost you if you want to put
it in your product.")

This brings up the interesting question of what to do if you find a snippet
of code in the archives of some mailing list and you don't have the context
around it to tell you whether it's "public" or not.  I'd think that would
fall under the "author known but conditions not" rule.

BillW

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...