6

I just ran into a situation I'm unclear of how to resolve in the best way:

This question: subtract two arrays in Perl - is really 2 questions in one:

  • Stated question (How do I do X) - is a duplicate of an older question
  • UN-stated - but very clear - question ("I wrote code Y to do X and it didn't work: Why?") is a pretty good question in its own right.

I have 2 options:

  1. Close the question as a duplicate (I have gold-tag binding close vote); and asnswer the "what did I do wrong" in comments.

    This is what I've done now.

  2. Don't close the question yet; post my answer of what did he do wrong - which seems pretty useful - as an answer - and THEN close the question as a duplicate.

#2 seems kind of hypocritical; but IMHO is better for the future readers who get the benefit of my explanation of why the OP made a subtle mistake.

15
  • 2
    Answering the question and then using your binding vote seems wrong. If it's a duplicate, mark it as a duplicate. If the original post doesn't contain the relevant information, I would add an answer to that.
    – Joe
    Commented May 15, 2014 at 13:13
  • @Joe - it's not that there's no "relevant information", it's that the current post has a second dimension ("why didn't this code work as expected?") that has NOTHING to do with the original post
    – DVK
    Commented May 15, 2014 at 13:24
  • I get that, but surely the OP could work out why his code didn't work as expected once presented with the correct solution?
    – Joe
    Commented May 15, 2014 at 13:40
  • 1
    @Joe - No he could not, as a matter of fact. "Correct", or rather canonical, solution is not even remotely related to his code. His code is also "Correct" (but different - it happens in Perl, a lot) but had a subtle bug. It may have helped if you read the linked question and comments.
    – DVK
    Commented May 15, 2014 at 13:42
  • 1
    If it's not a true duplicate, then it's not. Commented May 15, 2014 at 18:03
  • possible duplicate of Should I edit titles which have nothing to do with the actual problem?
    – jscs
    Commented May 15, 2014 at 18:23
  • @JoshCaswell - the title DOES have to do with an actual problem The issue is, his post is really 2 separate questions in one (the title reflectes one of the 2).
    – DVK
    Commented May 15, 2014 at 18:25
  • If I ask you, "How do I get to Detroit? My square wheels don't turn", the actual problem is my square wheels, not the route I'm planning. Fix the actual problem and edit the question to correctly reflect it.
    – jscs
    Commented May 15, 2014 at 18:28
  • @JoshCaswell - Um. No. The equivalent is "What's the way to get to Detroit by car? I took highway #1 and then left on highway #2 and am lost". He has 2 problems: First, if he's going down highway #2, he should have turned right. Second, taking Highway #3 is the usual and faster route (but not the only correct one). So his question really has 2 answers: 1) To get to Detroit NOW and get unlost, turn right instead of left on Highway #2; 2) In the future, take Highway #3, it's better.
    – DVK
    Commented May 15, 2014 at 18:31
  • Doesn't sound like it's a duplicate, then.
    – jscs
    Commented May 15, 2014 at 18:34
  • 1
    @JoshCaswell - the first question is a duplicate... second isn't. And they are both bundled up (validly - he was actually doing the right thing and trying to solve himself and showing his work) in the same question
    – DVK
    Commented May 15, 2014 at 18:38
  • Definitely answer it if you can. Commented May 15, 2014 at 18:54
  • You could close it as a duplicate, and write a comment about the specific error he made.
    – Barmar
    Commented May 16, 2014 at 21:01
  • 3
    @Barmar - That's exactly what I did. It's amazing that nobody commenting actually bothered glancing at the linked question.
    – DVK
    Commented May 16, 2014 at 21:39
  • You can also answer the unique question, and in your answer when you mention the attempted approach isn't the best, link to the older question as a source of information on the better approach.
    – Ben Voigt
    Commented Jul 14, 2014 at 20:04

0

You must log in to answer this question.

Browse other questions tagged .