Referring to Code Written by Others

Referring to Code Written by Others

am 17.11.2007 18:49:46 von AccessCoder

What is the proper way to reference code written by others in your
database applications?
If it is a code snippet from a usenet group, should you refer to the
posting?
If a posting in a usenet group refers you to an independent
programmer's website, and that programmer lists a code example on
their website as being copyrighted, but says that you can use it in
your applications (commercial or private) as long as you do not re-
sell it by itself or part of a collection, does this just mean you can
use it as long as you are not trying to sell it as a utility function?
How is the best way to document that a function or module is based on
code written by someone else, but has been customized to your own
application?

Re: Referring to Code Written by Others

am 17.11.2007 20:06:15 von Smartin

On Nov 17, 12:49 pm, "AccessCo...@gmail.com"
wrote:
> What is the proper way to reference code written by others in your
> database applications?
> If it is a code snippet from a usenet group, should you refer to the
> posting?
> If a posting in a usenet group refers you to an independent
> programmer's website, and that programmer lists a code example on
> their website as being copyrighted, but says that you can use it in
> your applications (commercial or private) as long as you do not re-
> sell it by itself or part of a collection, does this just mean you can
> use it as long as you are not trying to sell it as a utility function?
> How is the best way to document that a function or module is based on
> code written by someone else, but has been customized to your own
> application?

Personally, if I get an idea or use code from a newsgroup, I do so
under the assumption that the code was provided for free, and is free
of any kind of copyright restrictions. Having said that if I feel a
solution is exceptional I will credit the author in the code comments.
Even though I may be the only one to see it, I like to be reminded why
I used a block of code that clearly does not look like my own.

Where restrictions apply, I respect the author's request. If they say
it's OK to use the code as long as credit is given, so be it.
Obviously you should never repackage code and resell it if the content
of the package is not primarily your own work.

I like to cite borrowed code requiring a reference using an "official"
citation in APA format if possible. At a minimum include the web site
title, author's name, URL, and date downloaded. If you modified the
downloaded code, which is more than likely, just say so.

There's also the question of where to place credits/citations. The
author/website you are downloading code from may stipulate how visible
the reference should be. Other than that your style can probably
dictate whether you place comments in code (probably 100% of the
time), on a splash screen, on a help screen, or on the main form.

Re: Referring to Code Written by Others

am 17.11.2007 20:44:58 von lyle

On Nov 17, 12:49 pm, "AccessCo...@gmail.com"
wrote:
> What is the proper way to reference code written by others in your
> database applications?
> If it is a code snippet from a usenet group, should you refer to the
> posting?
> If a posting in a usenet group refers you to an independent
> programmer's website, and that programmer lists a code example on
> their website as being copyrighted, but says that you can use it in
> your applications (commercial or private) as long as you do not re-
> sell it by itself or part of a collection, does this just mean you can
> use it as long as you are not trying to sell it as a utility function?
> How is the best way to document that a function or module is based on
> code written by someone else, but has been customized to your own
> application?

The proper way, IMO is to study the code until we understand it. Then
hide it. Then write what we need (expressley) based on that
understanding.
If there is some brilliant idea implicit or xplicit in the code, we
may want to make a comment; here's one of mine:
'2003/02/26 buffer array attribution to David Epson
(about getting a version number)

That way we learn.
That way we are responsible.
That way we don't have 1000 extraneous lines that do things which we
don't need done.

When we don't undertand someone else's code well enough to rewrite it
in our own VBA idiom then, IMO, we should not use it.
Why?
Because when we learn we share, and when we don't take the time to
learn we just take.
And when we don't understand the code we use, there's an excellent
chance it will have its own revenge.

Newton said, "If I have seen farther it is by standing on the
shoulders of Giants".
There aren't too many of us who have such original code that it
doesn't owe much to those Giants.
What better reward for a Giant than we learn something?

(Little people, of course, are another matter.)

Re: Referring to Code Written by Others

am 17.11.2007 22:54:01 von Stuart McCall

"lyle" wrote in message
news:06f37e38-6dc6-4ffa-9205-2362093676f9@w34g2000hsg.google groups.com...
>
> The proper way, IMO is to study the code until we understand it. Then
> hide it. Then write what we need (expressley) based on that
> understanding.
> If there is some brilliant idea implicit or xplicit in the code, we
> may want to make a comment; here's one of mine:
> '2003/02/26 buffer array attribution to David Epson
> (about getting a version number)
>
> That way we learn.
> That way we are responsible.
> That way we don't have 1000 extraneous lines that do things which we
> don't need done.
>
> When we don't undertand someone else's code well enough to rewrite it
> in our own VBA idiom then, IMO, we should not use it.
> Why?
> Because when we learn we share, and when we don't take the time to
> learn we just take.
> And when we don't understand the code we use, there's an excellent
> chance it will have its own revenge.
>
> Newton said, "If I have seen farther it is by standing on the
> shoulders of Giants".
> There aren't too many of us who have such original code that it
> doesn't owe much to those Giants.
> What better reward for a Giant than we learn something?
>
> (Little people, of course, are another matter.)

Nicely put. I tend to use the analogy "learning to play the guitar". Anyone
can show you where to put your fingers in order to produce a particular
chord, but until you do it yourself you haven't learned squat.

Re: Referring to Code Written by Others

am 17.11.2007 23:44:38 von XXXusenet

lyle wrote in
news:06f37e38-6dc6-4ffa-9205-2362093676f9@w34g2000hsg.google groups.co
m:

> That way we don't have 1000 extraneous lines that do things which
> we don't need done.

Why does this matter? Comments are not in the compiled code, which
is what actually gets executed. Comments don't change what is
executed by one byte.

> Because when we learn we share, and when we don't take the time to
> learn we just take.

What if we also give code to others ourselves? Aren't we allowed to
take, too?

I use other people's code to save time, and that's why I offer my
own to others on occasion.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/