8

I just marked a question as a duplicate and due to the new rule about gold badges, it was closed immediately. Upon further reflection I'm not sure if I should have marked it.

The question is about removing adjacent duplicate characters in a string, but it actually asks 2 things. One, it asks what the problem is with the OP's solution, and two, it asks if there is a standard solution.

There is a standard solution, and it is far superior to the OP's attempted solution, so I linked to a duplicate right away. However, this doesn't answer the OP's question about what was wrong with their own code. So should I have marked it as a duplicate? What about cases where the OP doesn't even ask if there is a standard solution?

2
  • 1
    The comments indicate that the OP's problem is resolved, so I don't see any compelling reason to reopen the question.
    – Servy
    Commented May 15, 2014 at 20:30
  • I think that 4 other people would have agreed with you. Regardless of the OP's attempt to recreate the wheel, this has been solved before and the question were basically asking the same thing in slightly different ways. Pointing to best practice seems like a benefit more than a disadvantage.
    – Travis J
    Commented May 15, 2014 at 21:22

1 Answer 1

4

If you can make a "full scale" answer explaining what was wrong with the code, then most bulletproof approach would be to write that answer, add to it reference to superior solution explaining why it is to be preferred, and after that, close as a duplicate. This would likely cover every imaginable need of the site visitors and asker.

Other than above, there seem to be two options. First is to dupe-close, second is to seek for clarification from OP in comments: whether the superior solution suits them.

Here, again, think of site visitors deciding what option to pick. If the connection to the duplicate is obscure, closure would look confusing to them - from this perspective, clarifying things in comments prior to (or maybe even instead of) closing would be superior.

If the opposite is true, that is if readers would find it difficult to understand the difference between questions, closing looks like a better option. No need to deprive site visitors of learning about superior solution if the questions look the same to them.

If question gets closed but later it turns out that asker meant something else, there is always an option to edit the question to clarify the difference and reopen after that.


For the sake of completeness, if the question already refers "possible duplicate" and explains why it is not what asker needs, it would be generally better to avoid dupe closing. This is primarily because it may look confusing for site visitors. Think of it, how it would look like when under duplicate notice they find an explanation of the difference. (this doesn't seem to be your case though)

You must log in to answer this question.

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