Is downvoting proper thing for following type of questions which have some code in it:
- Unrelevent lengthy code is given
- Basic question is asked without searching documentation
- Question can be answered with some Googling
Is downvoting proper thing for following type of questions which have some code in it:
You are free to vote as you like.
However, the downvote button does have a tooltip:
This question does not show any research effort; it is unclear or not useful
A basic question that could have been solved with a quick documentation search is certainly fitting my interpretation of not showing any research effort.
A lot of irrelevant code is not in and of itself a reason to downvote for me, as that can still be remedied with a little editing. It is also hard to state how much is too much code, more often than not an OP forgets to include code that is actually relevant.
Most times not, because more code is better than less code. This second case is the one who would be worth a down vote most times.
If an user asks a question and is insecure about posting more or less code, should choose more code, because the relevant part could be in the omitted code. And many times happens that users ask question without posting all the code, getting thousands of comments asking for more code.
But I think there are "special cases" to this, consider this sentence when you down vote a question:
This question does not show any research effort; it is unclear or not useful
Let consider a case where there is so much code that who tries to answer doesn't recognize the relevant part of the code, also because the question didn't mention it. This would be a case of unclear question, and it would deserve a down vote.
Personally, I never down voted a question because it has a lot of code, but I would do it if I meet one question with a brutal copy-paste that shows no effort from who asked it.