Skip to main content
Tweeted twitter.com/StackSoftEng/status/970380534437249024
deleted 312 characters in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?

EDIT: The referenced question (Best practices for sharing tiny snippets of code across projects) does not apply here. I'm asking specifically about code that does not end up in a customer product, but is somehow used to speed up engineering.

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?

EDIT: The referenced question (Best practices for sharing tiny snippets of code across projects) does not apply here. I'm asking specifically about code that does not end up in a customer product, but is somehow used to speed up engineering.

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?

Added explanation about duplicate question
Source Link

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?

EDIT: The referenced question (Best practices for sharing tiny snippets of code across projects) does not apply here. I'm asking specifically about code that does not end up in a customer product, but is somehow used to speed up engineering.

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?

EDIT: The referenced question (Best practices for sharing tiny snippets of code across projects) does not apply here. I'm asking specifically about code that does not end up in a customer product, but is somehow used to speed up engineering.

Source Link

How should "useful throwaway" scripts be handled?

You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of course you don't commit the script, as it doesn't match the company quality requirements (it doesn't have documentation, nor does it have any tests).

Some time later you see a colleague working on a similar task. You go "Hey! I made a script for that. Let me look that up. [looks] Oh, it was stored on my previous laptop so I don't have it anymore. Too bad."

These scripts can often save lots of time, and as the leader of the team, I would like them to be stored in version control. However, if I impose the same rigorous standards as the rest of the code base to these scripts, I'm afraid most developers will keep them to themselves.

The only other option that I can come up with is to let developers store the scripts in a special part of version control, in which there is no quality control (much like GitHub Gists). The risk is that others will not be able to use the code because they cannot find or understand it.

How could this problem be solved? Or should it not be solved?