71

In the last year and a half I've answered almost 500 questions in the tag. We have a rather small community there and we like to open canonicals such as this one this one or that one. They usually help a lot with duplicates and are generally very useful to us.

One canonical in particular is What is the explicit promise construction antipattern and how do I avoid it?

It attracted over 2800 views and has both closed duplicates such as this one and a lot of linked questions. However it suffers from a particular interesting problem.

The same anti-pattern has a different name - "the promise constructor antipattern", people often use the terms interchangeably and I notice in comments and on IRC that it creates confusion - a part of this is that when people google it they can't find meaningful results fast.

Obviously, it'd be nice if people could find the canonical using the different name.

So I came up with a scheme today:

  • I opened a question showing similar code to the canonical and a title containing the searchable query.
  • I closed that question as a duplicate of the canonical as the gold badge owner on the tag.

This caused some confusion which led to meta discussion on the post's comments. I figured bringing it up for discussion on meta would be beneficial.

Here is the said duplicate


Is creating duplicates that solve a "searchability" issue a good idea?

12
  • You could help clear out confusion by adding a disclaimer to the question. If you have a meta post to link to (now you do), the better. Commented Apr 19, 2015 at 17:20
  • 15
    Wasn't it possible to add that term to the canonical? Other than that, sounds like a reasonable thing to do. Commented Apr 19, 2015 at 17:24
  • @MartijnPieters I tried coming up with ways to add it, but none of them are good - it ends up really clunky and huge. Commented Apr 19, 2015 at 17:25
  • 2
    For one, it feels like being rick-rolled. Maybe that is what grinds my gears most about it. :) And secondly, nobody searches for antipatterns - there are people who are conscious about them and then there are those that aren't. I'm afraid putting up honeypots for them like this won't work very well.
    – Tomalak
    Commented Apr 19, 2015 at 17:32
  • 1
    The other one worked relatively well (2800 views). I hope this one will too :) Commented Apr 19, 2015 at 17:33
  • Minus the number of views that are a direct result of you actively pointing people there.
    – Tomalak
    Commented Apr 19, 2015 at 17:34
  • 23
    @Tomalak it's not rickrolling at all. Rickrolling is when you expect a link to something and end up here (instead of what you wanted). What Benjamin has constructed is the StackOverflow version of Google's "Did you mean" function. Commented Apr 19, 2015 at 17:38
  • 4
    I was in the process of writing an elaborate answer with a number of reasons why all this is not a good thing, but they all start to feel pretty contrived now that I've thought about it some more. Technically there is nothing wrong with this and it has potential benefits. I'll remove my downvote on your question (I think you have to edit it for this to work).
    – Tomalak
    Commented Apr 19, 2015 at 17:40
  • @Tomalak I feel bad enough for getting reputation for it anyway - it's fine don't bother. The downvote didn't bother me very much - truth be told I was really unsure if it was appropriate and was looking for an excuse to bring it to meta discussion to know if it was a good idea or not. Commented Apr 19, 2015 at 17:42
  • 2
    Maybe make it community wiki if you don't want to get the upvotes yourself? Might be a good fit for this pattern ("creating canonical answers").
    – Tomalak
    Commented Apr 19, 2015 at 17:43
  • @Tomalak I tried, I'm kind of ashamed to say but I couldn't find the button -_-. In answers it's right under the "post an answer" but I couldn't find a counterpart for questions. Commented Apr 19, 2015 at 17:45
  • 2
    @BenjaminGruenbaum: for questions you need to request a conversion to CW, flag for mod attention. Probably because it'll affect all answers to the post. Commented Apr 19, 2015 at 17:52

3 Answers 3

42

The issue here is, as ever, titles. You want people to click on the question most appropriate for them and if the title doesn't seem to be the same as their own question most people won't click on it. Adding keywords to the question isn't always going to cut it.

So, if you've identified a situation like this the first thing to try is to attempt to change the title into something that people will recognise, as Martijn has suggested. If you're unable to change the title into something that works for both questions then I don't see a problem with what you've done.

Stack Exchange automatically redirects unregistered users clicking on duplicate questions to the duplicate target so the majority of people won't even know you've been a bit sly. If you're logged in then you may know something about how SE works and just click on the link. If you know nothing then I think it's still pretty obvious.

What may not be obvious is that your two anti-patterns/algorithms/whatevers are actually the same thing. It is definitely worth editing the duplicate target to make it clear that Thing A and Thing B are identical to avoid as much confusion in the re-direct process as possible.

In order to avoid the inevitable backlash you may want to flag your duplicate question for moderator attention and ask for it to be converted to Community Wiki. I don't really see a need to do so, though if the score goes negative through said backlash there may be unintended consequences.

tl;dr

Change the title if you can. If you can't the supposed goal is to help the interwebz and deliberate duplication seems like a reasonable way to achieve that goal.


For this particular title I'm not really qualified to give a proper opinion but I'd agree that it becomes quite difficult to parse if you try to put everything in one:

What is the deferred/promise-constructor antipattern and how do I avoid it?

You haven't, however, changed the main answer to state that the deferred anti-pattern is also known as the promise-constructor anti-pattern. I'd do that to ensure that you don't confuse people arriving from the duplicate and in the hope that over time the duplicate becomes less necessary.

It'll take a few weeks/months for you to determine if it is in fact necessary, especially now that it's linked on meta. If you could post the results of your science in, say, 6 months, it'd be a good indication of how effective this method of pushing people in the right direction is; and maybe still a few rapidly beating hearts.

1
  • I would go further: once a (not deliberately constructed) question has been identified as a duplicate, the title is the most important factor in deciding whether to keep it around. Commented May 31, 2022 at 15:42
4

I can't really answer the meta question about deliberately posting questions to close them. There's no harm in it, but it somehow feels wrong - maybe there is something else that does makes this necessary in the first place and that should be fixed instead?

I think we really should incorporate both terms in the same canonical. A separate, dupe-closed question won't really hit the nail for searches, unless we duplicate our answers there and use the other syntax explicitly.

I'll try to edit the canonical (to this) so that it demonstrates the problem with both syntaxes. I've probably already confused many people enough having used the Promise constructor in my answer to a question asking about deferreds…

2
  • What about the case where a particular answer (for instance a non-jQuery answer) is low in the list of answers and you want to make it easier for other users to find? Do you think the best solution is to edit the accepted answer to cover the less common case as well?
    – Andy
    Commented Oct 31, 2017 at 4:12
  • @Andy Editing the accepted answer, especially when not community-wiki, is a delicate matter. I wouldn't recommend it. I'd rather try to boost the popularity of the particular answer by deep-linking to it from comments.
    – Bergi
    Commented Oct 31, 2017 at 4:21
2

This should be avoided in favour of editing the original question or an answer to include the search keywords you want to capture. A new answer has done this for your example:

search results for "promise constructor antipattern", showing the example duplicate target in second place

Duplicates can be useful when they surface results that would otherwise be missed. They are less useful when they show up in results that already include their target. Instead they serve as potentially-confusing distractions. Visitors may not realize what's happened after they click the duplicate and are redirected to the original question that they've already seen.

The target question now shows up directly in the results for promise constructor antipattern, so it's no longer necessary to have your duplicate pointing to it. I suggest you delete it, and do as Ben recommended in his answer:

You haven't, however, changed the main answer to state that the deferred anti-pattern is also known as the promise-constructor anti-pattern. I'd do that to ensure that you don't confuse people arriving from the duplicate and in the hope that over time the duplicate becomes less necessary.

This should result in the phrase "promise constructor antipattern" being directly visible in the search results snippet, making things even clearer to searchers, and leaving your duplicate entirely redundant.

Consider creating intentional duplicate questions only in cases where this approach fails to produce the desired search results.

12
  • 1
    That link only happened because of the duplicate... Google didn't show these results when I posted it... Commented Apr 29, 2015 at 4:45
  • I thought that much was at least clear from my question Commented Apr 29, 2015 at 4:46
  • 2
    @BenjaminGruenbaum I know that the results changed. However, the direct cause of the results showing the target is probably not your duplicate question. The target is simply showing up because it now includes the keywords -- they were added by thefourtheye's answer.
    – Jeremy Banks Mod
    Commented Apr 29, 2015 at 4:57
  • And you're sure it's not because SO redirects non-signed-in access to duplicates automatically? Commented Apr 29, 2015 at 5:08
  • Because a to of sites that scrape SO appear on the first page with the "promise constructor antipattern" just fine :) Commented Apr 29, 2015 at 5:10
  • @BenjaminGruenbaum We can't be entirely sure, because you didn't try including the keywords (which you really should do in any case, as Ben explained) before creating your intentional duplicate. I would have expected it to produce the same results as we now have.
    – Jeremy Banks Mod
    Commented Apr 29, 2015 at 5:12
  • 1
    Of course we can be sure, search Google for "What is the promise constructor anti-pattern and how do I avoid it" and see for yourself - this shows up in the search results because of the duplicate closing, in fact this is why I did this thing in the first place. Commented Apr 29, 2015 at 5:37
  • @BenjaminGruenbaum Why are you so confident that that's not the result of thefourtheye's answer, which was posted within an hour of your duplicate?
    – Jeremy Banks Mod
    Commented Apr 29, 2015 at 5:39
  • 1
    Because, you can search for the exact title of that duplicate or heck Even the URL itself and it'll redirect to the correct post. This was the whole point of the creating-and-closing. Commented Apr 29, 2015 at 5:40
  • Also, because all the other titles in the first page are sites that scraped the duplicate I closed off of SO (and not the original "deferred anti-pattern" post). Commented Apr 29, 2015 at 5:41
  • Would you expect deleting your duplicate to cause the target to stop showing up prominently in results for promise constructor anti-pattern?
    – Jeremy Banks Mod
    Commented Apr 29, 2015 at 5:44
  • 1
    Yes, this has been my experience doing SEO and again - the whole point of making the duplicate question to begin with. That question is not meant to see the day of light ever (or accumulate upvotes, or views), it's just there as a gateway to that other one - try entering it from incognito you get permanently redirected (a "Status Code:301 Moved Permanently") result from the server Commented Apr 29, 2015 at 5:56

You must log in to answer this question.

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