Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

In my scripting exploits I often check to see if a script has been written previously before I begin from scratch. Often I can at least find some of what I need through google or other means. I then adapt what I find to my needs and put it into production. As a best practice, I comment my code and include author information (I'm not a fan of plagiarizing). However there becomes the question of how and when it's appropriate to add/change that author designation. I'll use a sample script from Ed Wilson off 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 view the author field as the point of contact for that script as it's the person who wrote it and understands it. Is there a general rule of thumb as to how much a script is changed before it no longer makes sense to list the original author? Or are they always the author and then you're an editor?

In the case of the latter, what's the appropriate way to designate that? Is it that you add a line under Author labeled "Editor" and change the last edit label? How exactly is the right way to document your contributions? Is there a documented best practice?

like image 760
Colyn1337 Avatar asked Jul 14 '14 18:07

Colyn1337


2 Answers

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.

like image 58
HopelessN00b Avatar answered Nov 15 '22 11:11

HopelessN00b


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.)

like image 31
mfinni Avatar answered Nov 15 '22 11:11

mfinni