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?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.Sign up to join this community
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:
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:
I wish more people would do the above (many do). I find the idea of not linking to external content to be nonsensical.
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.
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.
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.
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.