1

This question already has an answer here:

I felt like I fully answered a question somebody had, but I still got down-voted. I think it's because what they asked was not a recommended practice, but I don't understand why my answer was down-voted. After one comment, I put a disclaimer saying it's not best practice, hoping to improve the answer, but am still getting down-voted.
I'm trying to give back to SO for all the help it has given me, and want to do well. Please help me be a better answer-maker. :-)

The Question in question: How to save a generated query to the database

marked as duplicate by gnat, Toon Krijthe, Martijn Pieters, Josh Crozier, hims056 Mar 12 '14 at 16:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 7
    You did however only add the disclaimer several hours after posting the original answer. All comments below the answer (besides your last one) are also made prior to the disclaimer. Leigh's comment in particular seems to provide a reasonable explanation of what might have attracted downvotes. – Bart Mar 12 '14 at 14:08
  • 8
    I'm afraid an answer that suggests to shoot oneself in the foot cannot be deemed useful, even with a disclaimer that basically says "don't do what I just said, you will end up with a smoking hole in your foot". The downvotes are justified IMHO. – Frédéric Hamidi Mar 12 '14 at 14:10
  • 9
    @gnat But he doesn't get it. He doesn't feel that the downvotes are warranted. He hasn't fixed the problem that caused the downvotes to take place. That makes the post in question not a duplicate. That linked post is referring to the case where someone realizes what they did was wrong, wants to just delete the question, but can't, because it's a question with upvoted answers. – Servy Mar 12 '14 at 14:20
  • 1
    I didn't say "don't do this", just to be careful. In fact, my current job has done this exact thing in a different language. There are legit reasons to do this. But my issue is that I really did answer the question. Some of the downvotes happened after my edits, btw. – codemonkey Mar 12 '14 at 14:20
  • 1
    @gnat I read the "I get it" post, and I'm not sure it's a duplicate, but I see some similarities. I have edited the answer to add the disclaimer, which I felt was a "fix", but still get down-votes. Also adding to the frustration is that there are no "real", "better" or accepted answers, so I have nothing to help me see the light. :-) – codemonkey Mar 12 '14 at 14:26
  • 6
    Well, the absence of a good answer is arguably not an argument for not downvoting a perceived bad one... There is general opposition to posting unsafe code on SO, even with disclaimers. I tend to downvote such answers whenever I see them. (It's not a good idea to do this even in an Intranet - what if the product becomes public-facing one day, developers come and go and forget to document the pitfalls, and bang! You have a problem.) – Pëkka Mar 12 '14 at 14:27
  • 7
    @codemonkey Reading the comments, other people that evaluated the question felt that there was not enough information to provided to provide an answer that they would consider "suitable", which is why there is no other answer. Providing a "bad" answer to a question because it doesn't have enough information to provide a "good" answer is not a good idea. Instead you should request clarification from the question author, and potentially even close the question, until enough information exists for a quality answer. – Servy Mar 12 '14 at 14:30
  • @Pëkka I understand it's not an argument for not down-voting. I just meant that I can't compare my answer to the "correct" answer and say "oh THAT's what I did wrong". – codemonkey Mar 12 '14 at 14:31
  • @Servy I wish I had enough rep to up-vote that comment ;-) That looks like good advice. – codemonkey Mar 12 '14 at 14:33
  • Also, why is this question itself down-voted? Just irony? :-P – codemonkey Mar 12 '14 at 14:45
  • 5
    @codemonkey Mostly I'd say it's the tone. Your question is asserting that a bunch of people acted wrongly in downvoting you. The readers felt that they did not. Had you structured your question differently, more along the lines of, "can you help me understand what I did wrong here" instead of something that comes off more as "go get them bastards for downvoting me" you'll have found better reception here on meta. If you're going to assert that the community is wrong, and not you, you should have pretty strong supporting evidence. If you don't, assume that you're the one who made a mistake. – Servy Mar 12 '14 at 14:50
  • 1
    I tried to say it in a "I don't understand" kind of way, but I see what you mean. Thanks again @Servy – codemonkey Mar 12 '14 at 14:52
  • 2
    You were visited by teh downvot-brigade. They piled-on like any good football linebackers would. Just internets – Adel Mar 12 '14 at 15:05
  • 7
    They did their job downvoting a harmful answer. Nothing about that is wrong, or even undesirable. On the other hand, providing pity upvotes to a harmful answer just because it got a lot of downvotes is sending a signal to others readers that the answer is useful. Sending the signal that an answer is useful when it is not is very harmful. You also encourage people to continue posting comparable answers in the future, due to the positive reinforcement of undesirable behavior. You're harming the site by upvoting an answer for no reason other than that it has gotten a lot of downvotes. – Servy Mar 12 '14 at 15:20
17

As per the downvote tooltip, people vote based on whether or not an answer is useful. How anyone wants to define "useful" is left widely open to interpretation.

Just because an answer has code that compiles, runs, possibly even if it produces the desired output, doesn't necessarily mean that it's a useful answer. While code that isn't correct, and doesn't produce the correct output, usually means that an answer isn't useful, it's not the only thing that can make an answer not useful. Being bad practice, containing major security vulnerabilities, or having significant negative side effects (especially if they won't be immediately apparent), etc., if it is to the point that the reader feels that other readers are going to be worse off for having considered that answer, may well be justification for someone choosing to downvote the post. Whether or not the problems are that significant is, again, open to interpretation.

While a disclaimer can help, personally I find that most readers will ignore such disclaimers, and have a tendency to try very harmful code and continue to use the solution so long as it passes a single test case. Since the disclaimer often doesn't do its job of actually stopping people from using harmful code, I find it's generally not a reason to refrain from downvoting an answer containing a solution I consider harmful. That's my interpretation, of course, and not everyone else has that same interpretation.

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