72

How can we make canonical answers easier to find, especially from the review queue?

I was stumbling upon many Java questions with ArrayIndexOutOfBoundsException, being sure there must be some question that could be canonical. However, I was finding only poor questions of see-my-dump-and-fix-my-error type. Finally I've found this one.

Is there anything I can do to make the canonical question easier to find for future reviewers? An ideal would be for a question to appear first after typing the name of exception in the close-as-duplicate dialog.

I'm not aware of any tag for canonical questions, especially the one that would make the having higher priority in review queues...

37
  • 10
    I agree. It's a good idea to make few very-asked question as "more visible". It will be also faster to have a clean Q&A because we will faster find the better answer. Finally, this issue appear in so much lang/question, specially JS or html...
    – Elikill58
    Commented Sep 27, 2021 at 20:19
  • 13
    We really should have some good way to handle these provided by the site. Right now, the solution is just crowdsourced knowledge and initiative. Some tags like JS have listed some canonicals in the tag description. But it cannot really fit everything.
    – VLAZ
    Commented Sep 27, 2021 at 20:19
  • 1
    Some related posts that are worth looking at 1 and 2.
    – cigien
    Commented Sep 27, 2021 at 20:21
  • 13
    Check out the excellent stack app Duplicate Target Manager.
    – wim
    Commented Sep 27, 2021 at 21:00
  • 3
    I'm not an SME for either of these areas, and I have no idea how well they're cultivated, but there are [c++-faq] and [r-faq] FAQ tags, which exist to band together FAQs for those two areas respectively. Maybe those would be useful in others areas likewise?
    – zcoop98
    Commented Sep 27, 2021 at 23:03
  • 2
    @EkadhSingh Here's a query that does that (pulls most popular dupes for a given site).
    – zcoop98
    Commented Sep 28, 2021 at 14:00
  • 1
    @zcoop98 thanks for that query. Those numbers are quite mind boggling. Commented Sep 28, 2021 at 14:26
  • 7
    How does a "canonical question" look after, say, 9-10 years or more? I've seen plenty of "duplicates" point to a question that old, but the answers on the "dup" are more relevant than those on the "original" due to changes in language, software, or 1000 other things because it's only 1-2 years old or maybe only a few months old. We need to be careful when we look at "dups", because relevance to current situations can make even similarly worded questions very much not duplicates of answers using deprecated methods or procedures. Commented Sep 28, 2021 at 21:32
  • 3
    @computercarguy canonical doesn't mean it's unchanging. It just means that if people have questions or answers about X they should go in the canonical. That's in order to start relevant and complete. That's what a canonical is.
    – VLAZ
    Commented Sep 30, 2021 at 5:36
  • 5
    The most proactive way of finding a needle is to avoid dumping a haystack on top of it in the first place, but SO has no reward for using a magnet, and anyone who badmouths the hay gets shouted down. Some communities have resources like lists or wikis for popular duplicate targets, and that's about as good as it gets. Commented Sep 30, 2021 at 8:26
  • 1
    @computercarguy I hate to sound pedantic, but the ELU definition of normal usage of the word canonical does not apply here. If you take a look at the tag wiki of the canonical, the following meaning is used: "Canonical questions are those that have the many arms of duplicates pointing back to it as the one truest presentation (or near enough) of the problem. In other words, the most cited when duplicate questions are found." which precisely matches VLAZ's definition above.
    – 0Valt
    Commented Sep 30, 2021 at 15:12
  • 2
    @computercarguy Also regarding "When a language/library/etc. deprecates features, the "canonical" answer on even a 2 year old question loses it's relevance," you have to realise that not everybody is using the latest and greatest tech. If somebody wants to do frumpigation in Rapungel then we should have both how frumpingation was done in version 1.2.3 and how it's done in 42.44.45 - people who are stuck with old version can then still benefit from the old solution. People who are interested in updating their approach or just implementing it in the latest version can use the new techniques.
    – VLAZ
    Commented Sep 30, 2021 at 16:11
  • 4
    @computercarguy "How do we fix the "problem"" with a magic wand. It requires actual involvement from SE. We need better visibility of duplicate targets. We need people involved in finding duplicates instead of continually re-answering them. We need a duplicate closure that doesn't suck to people involved in it. We need better tools to curate content. We need more people curating content. We also need a proper user onboarding, not to be seen as "place to dump code".
    – VLAZ
    Commented Sep 30, 2021 at 17:48
  • 2
    @computercarguy "But what you seem to expect is that nearly SE user is also effectively a librarian of SE" no, certainly not "nearly every" I'd love it if more people did it, though. We have enough answers."why not put more pressure on SE for fixing the search functionality" sorry, what do you expect me to do which 1. I haven't 2. would be effective? I've supported any suggestion of a better search I've seen. SE have repeatedly shown they don't care about this through their inaction. I'm unaware of what I specifically can do to change this.
    – VLAZ
    Commented Sep 30, 2021 at 18:17
  • 3
    Wouldn't some of these strongly held opinions be better suited as an answer?
    – Kevin B
    Commented Sep 30, 2021 at 18:21

3 Answers 3

16

We should direct duplicates to a post addressing the cause of a bug, not the symptoms.

ArrayIndexOutOfBoundsException is a symptom that appears because the index used got the wrong value. But the reason why it got the wrong value could differ a lot for case to case. Same goes with other generic "there was a bug somewhere" messages such as NullReferenceException or segmentation fault.

One root cause could be that the OP doesn't realize that arrays are 0-indexed. If so, then the link you found is indeed an appropriate canonical duplicate. Not for ArrayIndexOutOfBoundsException questions but for "OP doesn't grasp 0-indexing" questions. If their index got corrupted for some other reason, lets say race conditions, that dupe target is plain unhelpful.

Requests for "super broad canonical dupe target" pop up from time to time. See for example this. As I wrote there:

This all seems like lazy moderating to me. NullReferenceException could be anything, it's just in the title because the person who asked the question doesn't know how to ask a good question. The actual problem isn't the exception (or the seg fault etc) - it's just a symptom. The actual problem is the bug somewhere in their code.

The correct way of moderating that isn't to clobber the post with some super-broad FAQ listing all manner of different, unrelated possible causes. Just because you are sick of seing "NullReferenceException plz halp" titles.

We need to drop this lazy moderation culture. Either moderate properly or stay your hand.


As for how to make it easier to find canonical dupes, that's a very old problem with SO that has never been solved by the site itself. Users of various tags could solve it by sharing their collection of canonical dupe links with others.

Now what I would do if looking for a dupe, is to go check the tag wiki, Java in this case. And look, there is some manner of FAQ link collection there! Scrolling through that list, I find the very canonical dupe you refer to below "debugging". (Not very intuitive perhaps, I'd expect to find it below arrays/containers or exceptions, but anyway... it is there.)

Other languages have made such FAQ link collections in their tag wiki too, which I believe is the best solution, long as veteran users of that tag maintain it and know where to find it. The only language tag I know of that actually used a special tag for canonical dupes is , which is admittedly a "meta tag" - using a tag wasn't the best idea to begin with. We can only use 5 tags per post and in this case 2 are already gone for and by default.

30
  • 9
    "We need to drop this lazy moderation culture. Either moderate properly or stay your hand" - indeed. Essentially what is true for reviewing is also true for moderating. The fact that there is far too much junk flowing in and the company not doing anything about it does not change the fact that you should still try to do the right thing.
    – Gimby
    Commented Sep 28, 2021 at 12:28
  • 5
    People don't search for "why can't I reference an array index that is greater than the length of the array in Java?". They search for (if they search at all) ArrayIndexOutOfBoundsException plus maybe java. and that's it. That's why having a catch-all "super broad canonical dupe target" is nice to have; for people to land on when searching. Now, it might be better if the answers to that catch-all question were spread amongst more targeted dupes for symptoms, like What does this symbol mean?, but a single target for searchers seems good. Commented Sep 28, 2021 at 12:51
  • 6
    @HereticMonkey Not understanding that very generic error messages are unhelpful is obviously part of the problem, see the other post that I linked. Obviously if people knew the cause of the problem, they wouldn't need to ask, but ending up with some generic post isn't necessarily helpful. This is a Q&A site and not wikipedia - our goal isn't to build wikipedia 2 or to collectively write a Java book. First of all I could obviously just RTFM about what ArrayIndexOutOfBoundsException means. But if that turns out unhelpful, that's when I would ask on SO.
    – Lundin
    Commented Sep 28, 2021 at 13:02
  • 5
    Pretty much the only possibly way someone can or would look for "the cause" of an issue where the symptom is an ArrayIndexOutOfBoundsException is by typing that error into Google. To say that a (well-written) canonical post explaining what that error means and how to generally investigate it is not a catch-all duplicate is, in my honest and rather blunt opinion, a fundamental misunderstanding of what this site attempts to do and what duplicates are for (letting people find answers through Google is a big part of that). If you want to help with OP's specific problem, fair enough, ... 1/2 Commented Sep 29, 2021 at 0:04
  • 2
    ... but that doesn't mean the question should stay open (those are not one and the same). Although I am open to a counter-argument explaining what value it would bring to keep a bunch of questions open that all have different answers but ask the same thing ("why do I get this error", with different code, but you can't realistically search for code), or how you envision users searching for and finding the cause of the problem in this case, if not by simply Googling the error (which I know is the first thing I usually try when I run into a new error). 2/2 Commented Sep 29, 2021 at 0:04
  • 7
    I would perhaps go even further and argue most "my code doesn't work" questions have little to no future value and are thus simply not a good fit for Stack Overflow. I'm not fundamentally opposed to those questions, I just don't think they belong here. But having a canonical post which points people in the right general direction and gives them some idea of how to go about fixing their issue (even though such a post might need to present a few possibilities and can't tell them where exactly they're going wrong in their code) is greatly preferred above simply shutting down all such questions. 3?/2 Commented Sep 29, 2021 at 0:14
  • 4
    @BernhardBarker If they had taken beginner classes they would know how to use a debugger. And then the place to look to find the cause is your own code base, not the Internet. Once they've at least tried to debug it, they are in a much better position to ask a good question. You don't learn programming by random google searches, you learn it by reading books/tutorials, taking classes and of course by coding. Lazy coddled kids who want to know the answer to everything instantly, without any effort on their part, have no place in any professional setting, including programming.
    – Lundin
    Commented Sep 29, 2021 at 6:17
  • 1
    And again, SO is still not wikipedia, nor is it RTFM. If failing to search in those two places, well then SO might be the next stop. Again, some effort is required by the person looking for a solution to solve the issue themselves.
    – Lundin
    Commented Sep 29, 2021 at 6:19
  • 5
    @Lundin I'm not entirely sure how to connect your comment and your answer. 99.9% of questions I've seen about index-out-of-bounds and null-reference exceptions involve a basic lack of understanding of what those exceptions mean and/or a lack of debugging (and/or not knowing that arrays are 0-indexed for the former), and your comment seems to suggest that we shouldn't "address the cause" of those (as per your answer), but rather that they don't belong on SO at all, i.e. close them (but of course the remaining 0.1% may belong here in some form). 1/3 Commented Sep 29, 2021 at 9:21
  • 1
    As for whether we should have a canonical basically explaining, to fix some error, that someone should debug and possibly how to do so, perhaps that's a separate discussion altogether (closing something as a debug question or as a duplicate seems similar enough to me). But to me that's not so much an issue of whether the non-canonical version of the "how do I fix this error" question strictly belongs on SO (although perhaps you could argue it sets a bad precedent). It's a question of whether is the Q in Q&A (it is indeed a question that people ask), ... 2/3 Commented Sep 29, 2021 at 9:22
  • 1
    ... whether it's broadly on topic (it is indeed about programming), whether it's as specific as it can or should reasonably be (yes, you can't really get much more specific than "how do I fix this error" to address the 99.9% of cases), whether a useful answer can reasonably fit within an answer post (I'd argue it can), whether it's to the benefit of the internet at large (it probably is) and whether people come here for an answer to it (they do; it would probably be best if they solve their question in different ways, but they do still come here often). 3/3 Commented Sep 29, 2021 at 9:22
  • 5
    I second @BernhardBarker, Lundin - the tone of your answer appears to entirely conflict with your comments below said answer. You complain about "lazy moderation culture" in the answer, but your comment complains about "lazy coddled kids".
    – Ian Kemp
    Commented Sep 29, 2021 at 9:32
  • 4
    @BernhardBarker Basically, the root cause of the exception may be that the OP doesn't grasp that arrays are 0-indexed. But the root cause of why they are having that question is that they didn't study the language they are coding in. "Super broad FAQ posts" are used when people really mean to say "you obviously didn't study the basics, go read the chapter about arrays in your Java book". So far I can relate completely to the urge to just clobber these kind of crap questions with a duplicate closure. ->
    – Lundin
    Commented Sep 29, 2021 at 9:38
  • 2
    But instead of sugar-coating it like that, we should be able to just close posts because of non-existent research, such as attempting to use arrays without even studying them. Because closing as duplicate turns problematic when the post is actually not a duplicate of the target. Suppose lots of people get the exception because of race conditions, as the example I gave. Then gets closed as dupe to the super broad FAQ and suddenly we have started to incorrectly teach the site that race conditions are caused by not starting array access with index 0. ->
    – Lundin
    Commented Sep 29, 2021 at 9:38
  • 2
    So, the "lazy moderation" is less about marking the question as a dupe than it is adding an answer to the dupe target explaining the edge case that's missing? Because it seems to me, if you think that case is missing from the dupe target for ArrayIndexOutOfBoundsException, you should add it rather than complaining about other people being lazy. More and more I see people whining about other people's laziness with no willingness to do any work themselves. Wrong dupe? Complain about it, but don't find the right one! See a rude comment? Complain about it, but don't take the time to flag it! Commented Sep 30, 2021 at 22:28
3

The advanced search tools do work in the duplicate search box. In this case since you're looking for a canonical that has a few hundred votes, you can use score:100 and adjust the minimum score until you find your target.

Unfortunately... this isn't something you can do to make the canonical easier to find for others. The most you can do is edit the canonical and other questions that appeared above it... but that's somewhat moot when there's thousands and more being posted daily.

We could certainly spitball on changes to the dupe search to make the results that are returned more likely to be relevant, such as using score to filter the results when there are more than 150 results, or prioritizing existing dupe targets, but these have similar downsides... we have to decide what downsides are worth dealing with to end up with a better solution.

1
  • well, other than keyword-spamming the canonical's question (please don't)
    – Kevin B
    Commented Sep 30, 2021 at 19:00
1

The reality is we need to get SE to give us better tools to use the site better. Without that, we are just complaining to each other about how badly we use the site with no hope of actually making the site, questions, or answers better.

Searching

One way we can get more people to search for existing questions and answers, instead of asking new questions, is to have SE make their on-site search functionality better. If that means they scrap their current functionality and replace it with Google or some other easy to use and reliable 3rd party system, but make it work on-site, then that works for me.

This includes the real-time searching happening when creating a title for a new question. Rarely have I found those results to be useful, and sometimes they aren't even relevant.

Once we get a better search functionality, we should automatically see fewer duplicate questions being generated. Not everyone, especially new users, will understand how broken the on-site Search bar is, so will use it thinking that it's working. They will then create a new question because that search failed them and so did the search when creating a title for their duplicate question.

Even those of us with lots of experience using SE have a hard time finding the correct solutions, including when looking to mark an question a duplicate. User VLAZ mentioned it in a comment with their answer here describing some of their problems.

Answer tags

Answers should get the same kinds of tags that questions do. We can tag them with language/library/etc. names and version numbers so people looking for answers aren't trying solutions that have been deprecated since the answer was written or is for a later version than the user needs. I can't tell you how many times I've gone though this myself.

I've seen questions that ask for specific languages to be used to solve a problem, then answers use a different language as an example. Tagging the answer with the language can be helpful, since sticking to the same language the question asks for isn't always necessary or followed.

We can also use these tags to make searching more reliable and relevant.

Other considerations

We should also consider having SE drop the -1 cost to reputation points for down voting. There's long discussions about that, so I won't get into it here.

We need more positive rewards for going through queues, marking items as duplicates, flagging for deletion, and more. Even editing a question or answer should gain you more than 2 points. And really, positive reinforcement works better than punishment. I'll even admit that I've refused to downvote because I just gained a privilege and downvoting would have taken it away.

Bugs and features with tracking

We currently use Meta as a bug reporting and feature request system. Unfortunately, that's not a very good system, which is apparent when there are so many duplicates asking for the same features and bug fixes year after year, yet nothing happens. We need to get SE to adopt a better system, then use it appropriately as users to get the features we need.

In a comment on the original question I asked the question: "why not put more pressure on SE for fixing the search functionality". And user VLAZ replied with:

sorry, what do you expect me to do which 1. I haven't 2. would be effective? I've supported any suggestion of a better search I've seen. SE have repeatedly shown they don't care about this through their inaction. I'm unaware of what I specifically can do to change this.

Well, we get them to commit to a new system and hold them to it. As of right now, that might be like pulling teeth, but it would go a long way to making things better, instead of complaining into the apparent void and echo chamber of Meta, where SE doesn't really seem to care no matter how many users repeat the same sentiments.

How does getting bug and feature tracking help fix the OP's problem? Well, it doesn't directly, but it does help us get the Search bar fixed, better ways to search (answer tags), and deal with other problems hindering/preventing question-askers from doing the research they should.

Conclusion

If users don't have the on-site tools they need to research properly, then we can't really complain when they don't do research. If they/we can't find duplicates, we shouldn't complain when people don't find them without prior knowledge of them. Heck, I can't find answers I've written because of how badly the Search functionality works.

Incidentally, I see many people complaining about users doing something wrong, or not doing something when it really comes down to the site not working as well as it should. More emphasis should be put on getting SE to fix problems than getting users to work around them.

Another answer here by Lundin says to mark duplicates by looking at the root cause, rather than the symptoms. Well, I think we should fix the problems on SE at the root cause of the site rather than the symptom of how people use it. This will actually reduce the amount of moderation and curation needed (as well as posting on Meta about how bad users are), reducing the amount of work everyone needs to do, instead of asking everyone to do more work.

Once we get Searching and other systems fixed, canonical answers should start popping up on their own more often without having to be curated by subject matter experts so much.

Edit: There's already a feature-request out for replacing the built-in search with Google results, but that's 7.5 years old and apparently didn't go anywhere.

Replace the built-in Elastic Search with results from Google instead

14
  • on a tangential note, answer tagging is currently under discussion (well, more precisely the discussion is planned to happen as one of the next steps after unpinning accepted answers) as part of the "outdated answers" project (as a way to mark answers as version-specific in a clear manner)
    – 0Valt
    Commented Sep 30, 2021 at 21:04
  • "is to have SE make their on-site search functionality better" 99% of all traffic comes via google. The most hit route is /question/<id>. Nobody use SE to search, they use google to search. SE is ok with that. The problem is the people that don't search at all.
    – Braiam
    Commented Oct 2, 2021 at 13:02
  • @Braiam, your comment contradicts itself. You say "99% of all traffic comes from Google", which is a search engine, so people are doing searches, especially when they come in the for of "question/<id>", as you say. I think you mean some people don't search as much as you'd like. BTW, do you have definitive proof that "nobody" uses the SE search? I've used it, only to realize just how bad it is. For that matter, do you have proof that 99% of all hits come from Google? I find that hard to believe. I bet a lot are from HNQ and linked/duplicate questions. That would fit the same URL format. Commented Oct 4, 2021 at 15:03
  • 1
    @computercarguy 94.8% to be exact, as of this comment.
    – Kevin B
    Commented Oct 4, 2021 at 15:06
  • @KevinB, do you have a source for that number? Commented Oct 4, 2021 at 15:07
  • Yes, the tools users with more than 25k rep gain access to.
    – Kevin B
    Commented Oct 4, 2021 at 15:08
  • @KevinB, that's at 25k and not going to happen any time soon for most of us, if ever. stackoverflow.com/help/privileges It's also the last privilege to earn. Commented Oct 4, 2021 at 15:11
  • 1
    Also, to be fair, that 94.8% is all search engines, not just google. But google makes up the overwhelming majority and I don't think other search engines making up a small portion of the result is significant to Braiam's claim. You could certainly be pedantic and say "Hah, clearly people do use SE's search!" but that's missing the point entirely.
    – Kevin B
    Commented Oct 4, 2021 at 15:13
  • @KevinB, so would "all search engines" include SE's search or only off-site searches? Commented Oct 4, 2021 at 15:14
  • only off-site search.
    – Kevin B
    Commented Oct 4, 2021 at 15:14
  • Let us continue this discussion in chat. Commented Oct 4, 2021 at 15:15
  • @computercarguy Well, the number of hits for /search is well below 1%. So, for all intents and purposes internal search engine is not used. Note, if you use authenticated users it would be above 1%, but those people rarely are looking for answers.
    – Braiam
    Commented Oct 4, 2021 at 17:52
  • @Braiam, if you are talking about users with an account when you say "authenticated users", then those users look for questions a considerable amount according to a blog from 2017. stackoverflow.blog/2017/03/09/… But, they probably aren't using the on-site Search because they know it's so bad, which is why I and others suggest to fix it. Commented Oct 4, 2021 at 19:41
  • You are linking the same blog post I linked. You are comparing a datapoint against itself. I said that over 1% of authenticated users use /search, but those are only 15% of all traffic. So, the amount of anonymous users that use search is less than that.
    – Braiam
    Commented Oct 4, 2021 at 19:57

You must log in to answer this question.

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