10

I posted an answer to someone else's question. Later, I found that my answer doesn't work any more (although it likely worked before). What should I ideally do now with my answer?

  • 1
    +1 for honesty! – Dan Hanly Oct 4 '13 at 14:27
  • @danielhanly.com Thanks :) – yurkennis Oct 4 '13 at 14:31
  • Can you be more specific? What changed such that it worked once but doesn't work now? Also, was the answer accepted (as this can change your options)? – Aaron Bertrand Oct 4 '13 at 14:35
  • @AaronBertrand Update to my answer details that: webapps.stackexchange.com/questions/12798/… – yurkennis Oct 4 '13 at 14:37
  • Looks to be like an API that's changed thus rendering the answer obsolete. – Dan Hanly Oct 4 '13 at 14:43
  • 1
    IMO, add a heading which states that your answer is for the question which was changed by OP. give link to that revision history of the question. – Mr_Green Oct 4 '13 at 14:45
  • @Mr_Green The question I refer to did not change by OP since my answer. – yurkennis Oct 4 '13 at 14:50
  • I know it's a different question, but how is it best to deal with someone else's answer webapps.stackexchange.com/questions/12798/… which is also not working any more? Suggest edit? Flag it (how?) Leave a comment saying it's not working any more? – yurkennis Oct 4 '13 at 14:53
  • @yurkennis leave a comment to give the other user a chance to fix it. But you should be descriptive. Don't just say "this doesn't work anymore" if you know the reason. You should be specific and say the Google has changed it's API and the answer won't work anymore. – psubsee2003 Oct 4 '13 at 14:55
  • @yurkennis and if the answerer doesn't respond, then you can downvote and/or edit. But flagging inaccurate answers is never the proper solutions as the mods are not supposed delete answers due to technical inaccuracies – psubsee2003 Oct 4 '13 at 14:57
  • In my opinion I think adding a disclaimer is the best option. Even if the answer doesn't work now, I feel it still has value in that at some time it did work :) might be useful for historical reasons. Deleting answers should only be the case if it really causes a lot of confusion. – aug Oct 4 '13 at 17:14
  • @aug How can we decide on the best way to go? – yurkennis Oct 4 '13 at 17:15
  • 1
    @aug My edit adding disclaimer to other's answer got a reject: webapps.stackexchange.com/review/suggested-edits/24725 – yurkennis Oct 9 '13 at 13:06
4

Couple things you can do:

  1. Edit it so that it works and ensure that it's relevant to the question being asked
  2. Remove it if it no longer works or is no longer relevant to the question being asked
  • 1
    An addition, things may change with time so the question may became meaningless with time (that happens a lot especially in gaming.stackexchange). So voting for the question from OP for an edit or question close may be an option too. – FallenAngel Oct 4 '13 at 14:36
10

Editing the code so it works or deleting the answer if it can't be fixed are the usual solutions, but before taking those steps you might want to ask yourself "Why doesn't it work anymore?"

What if the reason your answer doesn't work is because there is a newer version of the technology in which your previously working solution was rendered inoperable (due to changes in the language). Because programmers are often asked to work with older versions of languages, your answer might still be correct (and valuable) if it is based on an older version of the language.

If this is the case here, the the appropriate action could be to:

  1. Retag the question with the appropriate version specific tag (or tags).1
  2. Edit a disclaimer into your answer to indicate that this is applicable to only a specific version.

1 - you should only do this if in doing so won't render other answers incorrect, and if the OP has not specifically mentioned other versions in the question or comments

Now this doesn't appear to be the case for your specific situation since it is based on an public API that has been changed (and the older one is no longer available), but in general this is often a useful solution.

You must log in to answer this question.

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