In the course of your career, you’re going to accumulate a folder of scripts to do various tasks. There’s one really, really important lesson you need to learn as early as possible.
In a comment, include a link to the original source.
If you started from someone else’s script – whether it’s open source or copy/pasted from someone’s blog, put a link to it.
Scenario 1: The Ugly Exit: Sooner or later, one of your employers is going to say, “So, on your way out the door, we just want to make sure you’re not taking anything with you that the company owns.” At that point, it’s incredibly helpful to be able to say, “Here’s the list of scripts that I use, and each file documents where I got it from.” That helps you prove that there’s no intellectual property issues as you enter and exit a company.
Scenario 2: The Paranoid Entrance: In the same vein, one of your new employers is going to say, “You’re not allowed to bring anything in here that might belong to another company.” Then, from your home computer, you just publish a blog post that includes a set of links to your favorite toolbox scripts. Back at the office, you can show everyone that link, point to all the openly available scripts, and start downloading those.
Scenario 3: Starting a Blog: You might want to write a blog post, presentation, or book chapter about a technique you’ve been using over the years. You want to share a script you use all the time, and you think it’s yours, but you’ve been copy/pasting portions of it from all over the place. Some of those places might be blogs, books, or open source projects – each with their own licenses. It’s so much easier if you can take your list of sources from the top of your script file, contact each of the authors, and ask for permission.
I wish I’d have learned this lesson earlier in my career. As I changed companies, I sometimes found myself having to reinvent some scripts from scratch just because I wasn’t really sure where I’d gotten the original from, or what the legal terms were.
You know how they say it’s easier to ask for forgiveness than permission? Well, with companies in the legal, security, or government businesses, maybe not so much.
You left out technical reasons…
Scenario 4: Troubleshooting
The script could have failed because of CU26 or KB924537 or … Maybe the original author noticed too and made an update.
Scenarion 5: Migration planning
Will it work on vNext? Gotchas on Azure?
zdv — given the rate of change that Azure sees, it’s tough to guarantee something’ll work a month from now.
Tragically, I lost 8 years of vbscript in an ugly exit from a former employer. I still sometimes shake my fist at the sky over that.
Thanks for posting this, Brent. Very true.
I’m doing that for many years for a simple reason: having a short memory, I like to know who has written a script when I using it or showing to wider audience (local group meeting, company or at a conference).
I started trying to remember to include the original source a number of years go for a different reason. I wanted to know where I got it so I could always go back and see the context of the blog, forum, or article in case I needed to make changes. This is a great reminder though.