Recently I have been receiving down-votes because I do not correct the OP's answer to use "best practice." This has occurred on a few occasions regarding implicit or explicit syntax or deprecation of functions. For this question, I am specifically referring to PHP's announcement regarding deprecation of mysql_
functions.
In a question, the OP posts code that uses the mysql_
function and I post a correct (accepted) answer using those functions and inform the OP regarding the deprecation and alternatives. I would then receive a down-vote because I apparently have not sufficiently discouraged the OP's use of these functions.
Stack Overflow's How to answer states:
Answer the question
Read the question carefully. What, specifically, is the question asking for? Make sure your answer provides that – or a viable alternative. The answer can be "don’t do that", but it should also include "try this instead". Any answer that gets the asker going in the right direction is helpful, but do try to mention any limitations, assumptions or simplifications in your answer. Brevity is acceptable, but fuller explanations are better.
Going off the Answer the question guidelines, I know that my answer provides exactly what the OP is asking as well as a "use this instead".
Stack Overflow's Vote Down states:
What is voting down?
Voting down, also known as "casting downvotes", is how the community indicates which questions and answers are least useful.
When should I vote down?
Use your downvotes whenever you encounter an egregiously sloppy, no-effort-expended post, or an answer that is clearly and perhaps dangerously incorrect.
Following the above guidelines, I don't feel my answers meet any of the criteria for voting down.
I certainly attribute down-votes with a negative connotation. I ask, to what degree should "best practice" affect down votes?