43

I recently ran into this question from 2011:

What is the purpose of the return statement? How is it different from printing?

A user recently edited the question to include context and links to other similar questions in a sort of foot-note format. Is this something that we, as long-time users of Stack Overflow, should start doing to improve the site? Does it improve the site?

The motivations seems well-intentioned, but I wonder what happens if many people begin editing simple questions with ad-hoc exegesis without formal structure or guidance. I haven't seen this before—is there some guidance here?

2

5 Answers 5

58

I am the user in question.

I have been making edits like this based on patterns I notice while trying to clean up old questions - stuff like routing them to the proper canonicals, bypassing "chains" of duplicate links, reviewing whether there's a better target for the questions I come across, deciding whether other popular questions are distinct enough not to be closed as duplicates... you get the idea.


Some context, first.

There is a somewhat established pattern of using notes like this to suppress the urge to dupe-hammer questions that shouldn't be - for example, Why does "a == x or y or z" always evaluate to True? How can I compare "a" to all of those? was subject to some warring in its history and spent a long fraction of its existence being marked as a duplicate. While it addresses the same problem as How to test multiple variables for equality against a single value?, I have found that it's usually a much better closure target for beginner questions:

  • It frames the question as a debugging question rather than a technique question, which is important for a common gotcha
  • It puts the single value on the left-hand side and the multiple values on the right-hand side, which is more likely to match the code that prompts people to ask
  • It was written from the get-go to explain a specific problem clearly, while also sounding natural (in the terms a beginner would use)
  • The top answer is community wiki and discusses the problem all-in-one, in an organized way.

The previous question isn't meant to be a debugging question. It would have been better asked without the code attempt, instead just showing expected output. But now answers largely depend on it, so that can't be edited out. The question has an important separate existence (it is actually, IIRC, the single question in the Python tag most used to close duplicates). The answers show a much broader range of techniques.

The last time that the new question was reopened, a note was added so that it wouldn't get closed again - I'm not able to find a corresponding meta discussion at the moment, but I would expect that there was one. Later, the note got de-emphasized and set in small text (using sup or sub tags).


Back to the present.

That de-emphasized note style seems to have become the standard for "notes" on questions, which I've been following - I think. The goal is to establish:

  • Neither question is a duplicate of the other;
  • Someone who finds one question is likely to want the other (instead, or as well);
  • Someone who is trying to close a duplicate should consider whether the other is a better target.

I think this clearly improves the site, because

  • It discourages people from acting too rashly on question closures
  • People who find the question from a search engine may get relevant, curated additional information - or a direct link to what they actually wanted instead - placed directly where it will be seen next (rather than hidden on the sidebar, with only possibly-misleading title text, and no explanation)
  • A warning like this can be seen in the duplicate closure dialog (comments on the candidate dupe cannot unless you go visit that page in a separate tab)
  • Every edit to a question brings new attention to it via the Active tab, and new attention is important for popular canonical targets (so they can receive other edits for content, formatting etc. and make them as high quality as possible)

I am not too worried about "many people editing without formal structure or guidance" because

  • We are much more like Wikipedia than a forum; therefore editing is good, and formal structure can arise when a need is established
  • Unilaterally editing questions requires 2000 reputation and less than 1% of users have that, and my experience has been that most high-rep users feel they have something better to do on the site than the kind of cleanup I've been doing (not a slight against them; there are a lot of good things to do on the site!)

The question linked here has a lot of notes, admittedly. I will reconsider them; but generally I think it's better to put these kinds of things in a footnote than a comment, because comments are supposed to be ephemeral. As it happens, I have been working on establishing that one as canonical, for a little while now - see my previous meta post here.

One thing I've noticed with my overall task is that it's often a rather nuanced decision whether two questions are duplicated, and if so, which one should be treated as canonical. (On the flip side, sometimes there are hundreds of versions of a question, and all of them seem to be terrible - because it's a question that non-beginners take for granted, and beginners inherently lack the context to ask it well.) I've been using footnotes like this partly to document my choices and partly to advertise other good canonical targets. (I've noticed that the cabbage addicts will get annoyed if I just stream-of-consciousness everything that I'm doing into the chatroom, so instead I'm putting edited notes - i.e., collected thoughts in a highly visible location.)

I don't claim ownership over any of this editing. I didn't write the original version of the question, after all. I just want Stack Overflow to be the best reference library it can be (even if I'd rather redesign the whole thing from the ground up).

9
  • 30
    I like what you're doing with this, I think it's a good idea to help beginners see the surrounding landscape; if they needed the answer to that question, they can very likely benefit from some pointers to other related things that are related but different from a Q&A. Putting it in context. Agreed that especially high-voted posts should be treated more like wikipedia, especially very simplistic questions like this one that have no code or specific problem. Commented Aug 16, 2022 at 7:38
  • 20
    This is very much commendable. Keep it up. Commented Aug 16, 2022 at 11:30
  • 10
    Fun fact, 76% of users have exactly 1 rep. Excluding those, the metric of "who has edit permissions" jumps to 3%.
    – gunr2171
    Commented Aug 16, 2022 at 21:23
  • Great idea, but all the footnotes make the question seem way too cluttered. Have you considered surrounding them in blockquotes? Image comparison (before, after)
    – Prid
    Commented Aug 19, 2022 at 0:14
  • 1
    @Prid quote formatting is (as the name suggests) for formatting quotes. Please do not format text that as a quote when it doesn't represent a quote from another source.
    – VLAZ
    Commented Aug 19, 2022 at 15:17
  • 1
    The idea behind @Prid's two versions is why I was curious about this. Stack Overflow does a lot of A/B testing to make sure the interface & presentation of information works for user. When individuals start adding ad-hoc structural changes to the site (which I think adding a new section to questions is), we side-step that process. We all have opinions about what looks best, but none of us will have data about what actually works best. If there is consensus that this sort of addition is useful, Stack Overflow should provide guidance before we have a bunch of different versions in the wild.
    – Mark
    Commented Aug 19, 2022 at 15:29
  • 2
    @Mark the idea behind my comment was not to criticise the screenhot. It's that formatting something as a quote when it is not a quote is wrong. And suggesting to do it shows that the user thinks it's acceptable thing to do. It's not a matter of A/B testing how it would look - it just shouldn't be done for looks. At all. Ever. Formatting carries with it meaning "and" "non" "quotes" "showing" "as" "quotes" "is" "quite" "annoying" "to" "mentally" "parse". Or code that is not code. And anything that's not what it is formatted as.
    – VLAZ
    Commented Aug 19, 2022 at 20:55
  • @VLAZ my comment wasn't directed at yours. I totally agree with you — you're preaching to the choir. My point is that different users will have different ideas about how to implement this…none will have the benefit of user testing. They are essentially making a new feature on the site. And in the version linked in the question the text is formatted with the <sub> tag, which like quotes and code, has specific meaning and isn't meant to be used solely for presentation.
    – Mark
    Commented Aug 19, 2022 at 21:07
  • sub and sup tags are the only way I know to get text smaller than the default in Stack Overflow's flavour of Markdown. I would definitely appreciate a proper alternative. Commented Aug 19, 2022 at 22:56
24

I am not a contributor, so I'm very much talking from a passive user's perspective. The additional information is helpful and certainly improves the question in some ways, however, the format is confusing.

The linked example is a good one to illustrate this. The footnote adds context, but going there without having the context of this discussion, it leads to a notable amount of confusion. Was that footnote part of the question? Why was it included? Does it define the context in which the question should be answered? How important is it in understanding the answers? It also, to some degree, looks like an answer which doesn't make sense to be included in the question itself.

Power users might not have trouble to realize that the footnote was edited in by someone else for additional context and differentiating the question from potential duplicates, but others might not be so lucky.

While it would be regrettable to completely remove that information, I believe that it would be helpful to provide context to the existence of that footnote, to help users read and navigate the question. This could be as simple as adding a sentence clarifying that the footnote was added by a separate contributor and for what purpose.

7
  • 7
    This is a very good point. While this is a good idea, adding this content to the question pollutes it and adds a degree of uncertainty for the next reader. If they were asking the question but also had the answer then what is the point of the other answers? Commented Aug 18, 2022 at 17:44
  • 2
    The footnotes here aren't intended to answer the question as asked, but to indicate that related questions are answered elsewhere - and to give a quick summary to save a click. I can see where that causes confusion, and in this particular example, the total amount of footnote text has been troubling me. Commented Aug 18, 2022 at 20:52
  • 6
    It's not about your intent @KarlKnechtel, editing it into the question itself makes the intent ambiguous. If SO gave us a special markdown widget for this or supported actual footnotes then that makes it easier for you to inject the link at the phrase where it might be relevant, and keep the text separate from the actual content. Commented Aug 19, 2022 at 0:50
  • 2
    BTW, the Linked and Related articles in most cases does a good job at showing related questions. Post your answer, make sure it includes relevant links or key words, then those links are surfaced without affecting the content of the question. Commented Aug 19, 2022 at 0:53
  • 4
    I reckon if a new user would make such a question edit it wouldn't get past the Edit clearly conflicts with the author's intent option in the review queue. Commented Aug 19, 2022 at 2:02
  • Bainos: thanks for describing your experience with this. (Or your hypothetical experience, since I think you're saying you only went there after seeing this discussion, and had to try to put yourself in a mindset where you might be confused by it?). Adding a sentence or phrase introducing the footnote was my first thought, too. Perhaps an "Editor's note:" or "For future readers:"? Or perhaps "Additional info added to this canonical question"? (@KarlKnechtel). Possibly even linking to this meta Q&A, although I'd be hesitant to add a link that isn't directly useful to the actual problem. Commented Aug 19, 2022 at 3:52
  • I would only reference this post in the comments, in response to a complaint. Commented Aug 19, 2022 at 3:54
16

To add to the answer by Karl Knechtel:

The footnote method is a great addition to questions with obvious similarities and relationships to other questions.

Another method is to add a section like the ones below. Do it yourself when asking a question (no need to wait for Karl!). This shows that you have done the necessary research, and why the existing answers have not helped you. It also saves time for the future users who stumble upon your question, and who would benefit from the related questions that you have found.

References

or

See also

...

3
  • 3
    Both of these, References and See Also seem very good approaches. Like with "Further readings" in books, it could be good to describe very briefly (1 sentence) what the linked questions add to the current one, unless it is obvious from the title. Commented Aug 18, 2022 at 9:24
  • 1
    FWIW, I have been referring to these entries as "see-also"s in my edit comments. Commented Aug 18, 2022 at 20:48
  • 2
    It still doesn't make a great deal of sense to retrospectively edit posts (especially old posts) to include this information. You should include the resources that you have exhausted before posting, but if the information in your edit might have led to the post never being posted in the first place, or it ends up contradicting the question, well then that might lead to the question being closed or down-voted because the question itself is less clear. If they had this information, why are they posting? keep s coming back to my mind. Commented Aug 19, 2022 at 1:05
15

I agree with the concept, and compared to many other edits, this is valid and valuable effort and content.

I do not however think that editing the question is the right approach. It is a good workaround for a system that does not have the features that we would like but injecting content like this into the question without a visual standard confuses the issue for new and some old users. On the surface, when I look at an edit like that, I dislike it the same way I dislike users editing their post with an update to explain their chosen solution. I'm all for self answers, but questions should be questions, answers are for answers and responses to those questions.

I would like to see SO add a formal _footnote_ concept like this as a distinct section of the question, however it should be brief, otherwise how is this a better solution than adding a new answer, even if it is a community wiki response and pinning it to the top.

Apart from voting and trending, I think there should be a concept where mods or users of high rep in the associated tags could "pin" an answer as an authoritative reference. When collectives and articles came about, I was sort of expecting them to fill this space, but it didn't really work that way.

If nothing else, Karl Knechtel you have demonstrated a real need for SO to reconsider some sort of formal functionality to handle this concept.

7
  • 2
    There are many things I'd like Stack Overflow to support; this is certainly one of them. Commented Aug 18, 2022 at 20:48
  • 3
    My main reasons for using the question rather than the comment section are 1) comments aren't supposed to be long-lasting; 2) comments don't appear in previews when you are trying to find a duplicate for a close vote. Commented Aug 18, 2022 at 20:54
  • "Apart from voting and trending, I think there should be a concept where mods or users of high rep in the associated tags could "pin" an answer as an authoritative reference. When collectives and articles came about, I was sort of expecting them to fill this space, but it didn't really work that way." I was expecting that there would be hundreds of collectives, and that basically any tag could spawn a new collective with relatively little effort. Commented Aug 18, 2022 at 20:55
  • "how is this a better solution than adding a new answer, even if it is a community wiki response and pinning it to the top." These footnotes contain content that would not be appropriate for an answer. The purpose is to point at related questions, and to give reasons why OP's problem crops up. Any one-sentence description of a context-specific answer is incidental to that. Commented Aug 18, 2022 at 20:58
  • 4
    From what you describe, I think you're looking for the tag wiki, @Karl.
    – Cody Gray Mod
    Commented Aug 18, 2022 at 21:21
  • 3
    The tag wikis have effectively zero visibility, and they can't easily associate one question with another in the same way. Commented Aug 18, 2022 at 22:06
  • 1
    Actually, @CodyGray you're kind of right, these footnotes by definition will be standard phrases that would be stamped onto relevant posts... That is the point of tags and the tag wiki, to link relevant posts to a central guidance document. But it could end up spawining a lot of meta-tags... Commented Aug 19, 2022 at 0:12
4

The overall problem that this change is trying to address is that the same symptoms can be commonly caused by different issues and we would like to help those who found this question to quickly find other solutions that are highly likely to assist them if the answer to this question does not.

It's sort of like proactively marking synonyms, antonyms and homonyms to a dictionary entry. The edit here is addressing scenarios where both print and return feature in code examples in slightly different contexts and why you might choose to change the context. Instead of directly answering the question this edit is digging deeper to analyse why the question was asked in the first place and tries to target that original line of thought.

I actually think the comment from Karl was more relevant than the edit, the issue is that in in version 2 print was a statement, and that confuses noobs who might think that the print statement was an equal and valid terminator like the return statement.

In trying to convey this information to the reader there are two problems within the Stack Overflow interface that these types of edits are trying to solve:

  1. Where to document standard snippets of advice that is indirect to the question, but highly likely to be relevant to other users who arrive at this question from their own research

  2. How to link that information back to the question in a way that will help people who arrive at this this question are likely to actually read it.

As explored in the comments to my other answer: https://meta.stackoverflow.com/a/419895/1690217 Tag wiki is a potential place to put this information, given that it was a quirk of print that was commonly misunderstood, this information should go into the print tag wiki... but that would be an ambiguous tag, this is very specific to print in python. It could probably go into the return tag in a more general way, as similar misunderstandings could apply in different languages, though it would take really ambiguous examples for the learner to get confused in the same way.

One course of action might be to create a new python-print tag or python-return and then this information could go there. But I'm not sure how many other questions would qualify for either of these tags or if there is any other benefit to the community by adding either of them.

Even if we do put this information into the [return] tag wiki, the problem is that the tag-wiki is not easily visible to the un-trained user, you can see an excerpt by hovering over the tag, but for the users who this information would help, they are not likely to interrogate the tag wiki directly or hover over the tag.

Rather than editing the question, as this is NOT something we want to encourage unless it directly contributes to improving the readability or accessibility of the question, this information belongs in tag-wiki, or a separate answer of its own. After editing the tag-wiki, you can leave a comment directing people to the specific wiki entry, until SO implement improvements to the visibility of the tag wikis.

A call to action for SO, please find a section of the screen (there is so much space) to display the tag-wiki summary when we are in desktop mode and/or provide a way that we can link to a specific heading or other anchor within the tag-wiki as they grow to become useful resources of their own.

When we make Tag-wikis more accessible themselves, then users will start to appreciate the value of them and will help contribute to them more.

You must log in to answer this question.

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