Every single day, I see a few questions with the same format: something generic, along the lines of "It doesn't work", followed by a poorly formatted piece of source code with macroscopic issues, if not syntax errors. No hints at what the problem might be, no proof of effort being shown.
A row of downvotes and "use a debugger", "what have you tried so far?", "learn C/C++/whatever and it will be crystal clear" comments follows, until someone posts an answer, pointing out the obvious. Many of these questions are closed and eventually deleted, but the OP gets the answer.
My opinion is that answering these questions is detrimental to the community, since it encourage help vampires. It's detrimental to the OPs too, as they won't learn to solve their problems, which is an essential task for a programmer (well, not only for a programmer). Nothing makes you learn something like spending two hours debugging your code. Maybe some hints by more experienced programmers might help, but you can use the chat for that.
Well, if I see a complete (not a hint) answer, I often leave a comment for author, telling not to encourage this kind of behavior. Until a high-rep user (around 5000 points) replied saying that since the answer was that easy and he knew it, he saw absolutely no problem with posting it.
I know it's quite easy to answer these questions, but that's not the point. Anyway his remark made me question my own opinion. So, what would be the best course of action?
- ignoring them?
- possibly leaving hints in the comments?
- answering by giving some hints?
- answering with a complete answer?
- marking as duplicate of reference questions pertaining the specific topic (like allocating huge arrays on the heap, not freeing
malloc
ed memory etc.)? These questions are quite unique, but the issues with code are more or less the same. - something else?
And, more importantly, was the 5000-point user behaviour acceptable? Is the behaviour of people answering these questions acceptable? Is it OK to tell them not to encourage help vampires?