As I have already explained my pro GitHub arguments in the question, I'm going to rebut the con arguments I mentioned here:
- Answer does no longer directly contain all relevant information, one could argue that it is a link-only answer.
I say this is not true because all answers that advice installing a software X from anywhere would then be link-only as well - they only contain instructions how to install and use that program, but not the program itself, right?
If the whole internet breaks down and only Stack Exchange survives, any answer advising to download software from the official repositories, Launchpad PPAs or any other online place would be gone as well. There's clearly no difference to an externally stored script.
Or on the other hand, are suggesting that if I do not upload my script to GitHub but package it and upload it to my Launchpad PPA, that would change the value of my answer telling you to download and run it?
- The link might die and the script may no longer be found. That's the main reason why link-only answers are not allowed.
I say there is no higher risk of a link to a GitHub repository to become obsolete than of a Launchpad PPA to get deleted or a package to become no longer available in any other way. I consider GitHub isto be pretty safe and stable and it will probably not quit business within the next years.
- It requires an additional click to get the needed information.
I personally prefer three additional clicks to download a file over a long and careful click-and-drag to copy only all the code from the answer's code block and nothing morenot too much or too few.
There are also wget
or (or git
) commands that download the file directly - as simple as running apt-get install
to get regular software. That isn't an additional click then either, you need the terminal to chmod +x
anyway.
- You need to leave the site to get the needed information.
So what? If you can trust Stack Exchange, you can also trust GitHub to be a non-malicious site. It's not a shady download site but the world's most famous place where open-source code is stored. The trustworthy of the site itself does not allow conclusions about all code pieces they host though.
Of course code on GitHub is not really reviewed or rated, but is it on Stack Exchange? There is no guarantee here either that anybody thoroughly checked every line of code I posted for correctness or security issues, even if the chance is higher.
However, those who would review hundreds of source code lines directly in the answer can also review them on GitHub and file an issue report there or comment below the answer where I post about it here on Ask Ubuntu.