28

I came across g++ compilation issues on Ubuntu 14.04/14.10 and while reading it there is a link code base the OP was using. When clicking on the link it immediately downloaded a file instead of taking me to github. I dont know what the consensus is for linking to projects on github but I have seen it in a couple of other post so I was okay with it. The part I didn't like is that when I clicked on the link to the the files it immediately downloaded a zip file.

Should links that just download a file be pruned out of the post or at least edited to make people aware that it is a download? I know my heart rate went up when instead of opening a new tab a file started downloading.

6
  • 17
    "I know my heart rate went up when instead of opening a new tab a file started downloading." Mine did too just reading your post.
    – ryanyuyu
    Commented Jun 12, 2015 at 16:33
  • Looks like the OP in this instance edited the link after your request. So good news there! Still up for the general case though. (Especially since OPs won't always acknowledge requests in the comments, or even come back to the question.)
    – Kendra
    Commented Jun 12, 2015 at 16:37
  • 46
    I am the OP on that post and realise now I made a serious mistake and fixed it as fast as I could. The reason I linked the file directly rather than the github page is that there are a large number of packages linked on the same page so I wanted to be clear which package I was using. Linking directly was a bad way to do it. Sorry for any elevated heart-rates (or even offense!) that this caused. I am new to SO and still learning.
    – senecaur
    Commented Jun 12, 2015 at 17:00
  • 8
    @senecaur thank you for coming here to answer that and taking to heart the discussion :) much appreciated ^^. Hope you'll enjoy your time on SO :)
    – Patrice
    Commented Jun 12, 2015 at 17:47
  • 6
    @senecaur I hope you do not fell offended or bad by me asking this here. I realized that you didn't have an malicious intent and you were doing what you thought was best. I am just trying to find out what should be done with direct download links. I do appreciate you fixing the link in your post. Commented Jun 12, 2015 at 17:50
  • 5
    @NathanOliver Not at all, no offence taken on my part - I was more concerned that I had caused offence and wouldn't be able to get help with my actual technical issue. I think this post is valuable in preventing others from doing what I did.
    – senecaur
    Commented Jun 12, 2015 at 17:59

2 Answers 2

29

I also felt offended by that direct download link.

Should links that just download a file be pruned out of the post or at least edited to make people aware that it is a download?

I'd probably change it to something like (if I had thought about doing so, instead of just down- and close-voting the question):

You can download the source code here: http://lvdmaaten.github.io/tsne/code/bh_tsne.tar.gz

Such the download won't be started immediately, and everyone can actively decide, what they want to do.

3
  • 1
    I agree here. This could be used as a cross-site attack vector. This rule should be added to the user guides and/or tour. Violators should be prosecuted to the fullest extent of the law.
    – Aloha
    Commented Jun 14, 2015 at 11:37
  • 1
    @PandaLion98 Probably not, since posting external links to source code in questions or answers is unwanted a priori. Commented Jun 14, 2015 at 11:39
  • "could". Good point though.
    – Aloha
    Commented Jun 14, 2015 at 11:41
1

I think editing the question to either:

  1. Fix the link so it just goes to the GitHub page (if it is one and its easy to see where it should be going)
  2. Remove the link entirely
  3. Add a very clear WARNING that it is a download

Would all be legitimate edits. I think fixing or removing are the better options; I can't see many people trying to answer a question are going to want to download code.

However, if the question doesn't stand on its own without the link then it may need to be closed because it doesn't contain the shortest code necessary to reproduce [the problem] in the question itself.

2
  • IMHO, option #2 is strongly preferred. There's a good reason that the general guidance on SO is to not include links to external content, at all. If a question is so complicated it requires external content, then it's too complicated for SO. If it's not, the content belongs here. The whole point is for the SO information to last well into the future; questions that rely on external content often wind up useless, because the external content disappears. Commented Jun 14, 2015 at 6:26
  • 3
    And to be clear: I'm not against external links entirely. Just ones without which a post cannot be fully understood. If as a reader I can ignore the external link, then it really matters a lot less how that link is presented, since I'm just not going to bother clicking on it anyway. Commented Jun 14, 2015 at 6:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .