What is the right way to exchange credit for Script Creation and Editing?

In my scripts, I often check to see if the script file was written earlier before I start from scratch. Often I can at least find some of what I need using Google or other means. Then I adapt what I find in my needs and put it into production. As a best practice, I comment on my code and include information about the author (I'm not a fan of plagiarism). However, the question arises of how and when it is appropriate to add / change this designation of the author. I will use a sample script from Ed Wilson outside his blog for reference:

Function Get-OutlookCalendar { <# .Synopsis This function returns appointment items from default Outlook profile .Description This function returns appointment items from default Outlook profile. It uses the Outlook interop assembly to use the olFolderCalendar enumeration. It creates a custom object consisting of Subject, Start, Duration, Location for each appointment item. .Example Get-OutlookCalendar | where-object { $_.start -gt [datetime]"5/10/2011" -AND $_.start -lt ` [datetime]"5/17/2011" } | sort-object Duration Displays subject, start, duration and location for all appointments that occur between 5/10/11 and 5/17/11 and sorts by duration of the appointment. The sort is shortest appointment on top. .Notes NAME: Get-OutlookCalendar AUTHOR: ed wilson, msft LASTEDIT: 05/10/2011 08:36:42 KEYWORDS: Microsoft Outlook, Office HSG: HSG-05-24-2011 .Link Http://www.ScriptingGuys.com/blog #Requires -Version 2.0 #> Add-Type -AssemblyName "Microsoft.Office.Interop.Outlook" | Out-Null $olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type] $outlook = New-Object -ComObject Outlook.Application $namespace = $outlook.GetNameSpace("MAPI") $folder = $namespace.getDefaultFolder($olFolders::olFolderCalendar) $folder.items | Select-Object -Property Subject,Start,Duration,Location } 

I consider the authorโ€™s field as a common ground for this script, as this is the one who wrote and understands it. Is there a general rule about how much the script has changed before it makes sense to list the original author? Or are they always authors, and then you are an editor?

In the case of the latter, what is the appropriate way to indicate this? Did you add a line under the author called "Editor" and change the last edit label? How to properly document your contributions? Is there a documented practice?

+7
scripting powershell
source share
2 answers

As a rule, I am the author myself and include my (working) contact information, considering how comments are for domestic consumption, and I would be most useful to everyone who read the comments.

I also usually place the โ€œadaptedโ€ field or where I list, where and from whom I grabbed any snippets of code. It's a lot less about plagiarism (these people have provided their code for free online, they expect people to copy it), and much more about finding resources again if necessary. My bosses don't even care about โ€œcreditโ€ for scripts - I could write it from scratch or copy it all while it works ... and I suspect that the same applies to most people in IT.

+9
source share

Assuming you are allowed to use the code for what you intend to use it, and comply with all laws and restrictions ...

You will need to understand this for yourself and the target audience. If this is for something that you use as the system administrator in your company, who cares? You credit yourself and the source (s), no matter who the author and who is the editor.

For something distributed by customers / the world, you should probably be the main contact if someone has support issues, as it matters how it works in the context in which you distributed it.

As for the author-vs-editor, this is a pretty restrictive way to look at it. Think of something like the Linux kernel - Linux Torvalds is the original author, but there are many people who have contributed.

(I voted in favor of moving to SO because it really is a programming issue.)

+3
source share

All Articles