What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

Should posts be self-contained; that is, should questions and answers avoid linking to outside material?

For example, I recently edited to inline code the author had put in a paste bin. Was that appropriate?

Return to FAQ index

share|improve this question
    
Excellent question to bring to the attention of this community! –  Lawrence Dol Feb 6 '09 at 2:03
    
I think: It doesn't matter. People will still point to external sources when SO won't satisfy their needs. –  OscarRyz Feb 6 '09 at 2:19
1  
@Oscar: People will do whatever they want, of course, but hopefully can be convinced by sound reasoning. And everyone with 2k rep. can help, too. –  derobert Feb 6 '09 at 2:31
    
The topic is important for SO, so no closing please –  Robert Gould Feb 6 '09 at 2:32
3  
The last thing we need is to encourage even more wild guessing. The best answers are the ones with canonical links. Bad, bad idea. There's no halfway interesting question that doesn't get reasked and reanswered again every 3 or 4 weeks anyway. –  le dorfier Feb 6 '09 at 2:40
    
This is an excellent question. –  George Stocker Feb 6 '09 at 2:52
    
IMHO this is a worthwhile question. –  cletus Feb 6 '09 at 5:13
    
Did you have a legal right to copy from Pastebin to SO? What license was the material on Pastebin under? This matters. –  TRiG is Timothy Richard Green Aug 23 '11 at 16:06
    
They should, except when they shouldn’t. –  kinokijuf Jan 30 '12 at 18:12
add comment

migrated from stackoverflow.com Aug 29 '09 at 9:42

This question came from our site for professional and enthusiast programmers.

7 Answers

up vote 26 down vote accepted

Usually.

One of Stack Overflow's goals is to have answers be useful to people who show up months or even years later via Google. While cool URIs don't change and live forever, far too many are lame and ephemeral. Linkrot is a leading user frustration on the web as as far back as 1997; and you can be pretty certain a user who follows a Google link to Stack Overflow only to find his answer is 404-compliant will not be happy.

Even with cool links, it's an extra step to follow the link; it's a hard step if the relevant material is a small part of the linked resource. Self-contained questions are just better.

There are, however, certainly some times when external links are okay:

  • Links that we're confident will stay good. For example, Wikipedia's Link Rot article will probably still be around a decade from now, and with up-to-date information. MSDN will still be around, but beware they sometimes break old URIs.
  • The amount of relevant external material is huge, for example a specification.
  • Links which are supporting information only (e.g., citations) where the relevant bits are contained in the question or answer.
  • Evanescent links in questions are less problematic than in answers.
  • Often material can't be copy-pasted due to copyrights; it should be summarized/rewritten if possible.
share|improve this answer
    
I'd also specifically call msdn as a good place to send a link. –  Joel Coehoorn Feb 6 '09 at 2:12
    
@Joel: Added MSDN. –  derobert Feb 6 '09 at 2:14
2  
msdn screws up old links on occasion too though –  Steven A. Lowe Feb 6 '09 at 2:21
4  
MSDN!? About a third of the links to MSDN I find in the wild tell me that page no longer exists. MSDN of all sites has a horrible reputation of dangling links. –  Robert Gould Feb 6 '09 at 2:27
    
@Steven: That sucks. Should I take MSDN out? –  derobert Feb 6 '09 at 2:27
    
@Steven, @Robert: Ok, I've tried to fix the MSDN note. –  derobert Feb 6 '09 at 2:28
add comment

Personally I think the idea of not linking outside content is nothing short of ludicrous.

If anything, I think a lot of answers don't link enough outside content. My general policy is:

  • Never post a direct URL. Always give it a label like this not like this: http://stackoverflow.com/questions/518828/should-stackoverflow-be-self-contained.
  • Don't ever put link text of "click here". Put something meaningful. Instead of "To see an example click here" put "Please refer to Should Stack Overflow be self-contained?". The link text should be an accurate yet succinct summary of what the resource is and/or why you're linking to it. The title of the document is a good fallback position.
  • If you mention an API function or similar, link back to the "official" documentation, for example if I were discussing the jQuery ajax() function.
  • Try to keep what you write here succinct and pertinent and this is a judgement call but you don't want to be repeating everything that is posted elsewhere. There's such a thing as information getting lost in data.
  • Link to other relevant Stack Overflow questions and external questions, forum threads, blog posts and so on that further elaborate on the topic.

I wish more people would do the above (many do). I find the idea of not linking to external content to be nonsensical.

share|improve this answer
2  
I agree with this, actually. I think I'm more going for, an answer should be supported and extended by the external links, but not dependent on them. If the "fragile" external links break, the answer should still be useful. (Fragile, as opposed to reliable ones like Wikipedia) –  derobert Feb 6 '09 at 2:36
1  
Your 'like this' example would be better if it were more meaningfully describe - a link 'like this' is not good. –  Jonathan Leffler Feb 6 '09 at 3:25
    
So, I'm trying to see how "like this" is an "accurate yet succinct summary." –  BobbyShaftoe Feb 6 '09 at 6:14
2  
I agree that linking is good, but only if the link is something that is at least semi-permanent. Creating content in a paste bin for the sole purpose of linking to it on SO is a bad idea for a multitude of reasons. –  TM. Aug 29 '09 at 22:53
add comment

In a similar vein, I think that Stack Overflow should provide image hosting, so that users that want to display an image or screenshot in their questions or answers will be able to do so without hosting it themselves or finding a picture on Google. This way there's no risk that the linked image will no longer be available when the poster loses interest in hosting it, or, if it was hotlinked from somewhere else, that the source moves or pulls the content.

This has already been suggested, and rejected, but then again that was several months ago and Jeff might be more receptive to the idea now.

share|improve this answer
1  
There are, thankfully, reliable image hosting services, as noted in the uservoice comments. But, yeah, if we want SO to be self-contained, image hosting should be offered. –  derobert Feb 6 '09 at 2:33
add comment

Answers that consist of a single link are generally bad, an answer should give an executive summary of the contents on the linked page, so even if the link dangles somebody later on will know enough to do the appropriate searching at least.

share|improve this answer
add comment

I think it's inevitable to want to add content that says: "well, look at where I got this information".

But it's always positive to try to include some of the information in the answer and use the link as reference or further research material.

I would say Stack Overflow shouldn't be self contained, but the answers should include enough information to be informative even without the links.

share|improve this answer
    
If the answers answer the question without the links, isn't that self-contained? –  derobert Feb 6 '09 at 2:26
    
lol .. I mean yes.. I mean.. yeah...er..self contained in terms of the answer "having it" but not self contained in terms of "allowing" outlinks. :-) but I get your point. –  Ric Tokyo Feb 6 '09 at 9:28
add comment

A self-contained answer is best, but links to expansive articles are also appropriate.

For example, the answer to several OOP questions on Stack Overflow is "the law of demeter". Explaining this in a sentence or two is fine, but a link to the Wikipedia article or some other source likely to be relatively permanent is good, too.

share|improve this answer
add comment

Sometimes, you need to include external URLs, because some content to help answering questions is in a book. For example, I love reading books. When I know something that I've done, it can be self-contained. However, when the solution is in a chapter of a book or in content that can have copyright, I must add a hyperlink.

share|improve this answer
add comment

You must log in to answer this question.

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