What is the Proper Way to Share Credit on Script Authoring and Editing?

I generally have myself as the author and include my (work) contact information, seeing as how comments are for internal consumption, and I would be the most useful point of contact to anyone reading the comments.

I also generally place an "adapted from" field or section in there where I list where and from whom I grabbed any code snippets. It's a lot less about plagiarism (these people provided their code online for free, they expect people to copy it) and a lot more about being able to find the resources again if needed. My bosses don't care even a little about "credit" for scripts - I could write it from scratch or copy-pasta the whole thing, as long as it works... and I suspect the same is true of most people in IT.


Assuming that you're allowed to use the code for what you intend to use it for and are complying with all/any laws and restrictions....

You'll have to figure that out for yourself and the intended audience. If it's for something that you're running as a sysadmin at your company, who cares? You credit yourself and the source(s), doesn't matter who's the author and who's the editor.

For something distributed to clients/the world, you should probably be the main contact anyway if someone has support questions, since it matters how it works in the context that you've distributed it.

Regarding author-vs-editor, that's a fairly limiting way of looking at it. Think of something like the Linux kernel - Linus Torvalds is the original author, but there's a whole lot of people who've contributed.

(I voted to move to SO, because this is really a programming question.)