Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

So I was reading this question and there are two answers there that I like

  • jlordo's answer succinctly and clearly answers the question that is being asked
  • RobHruska's answer doesn't exactly answer the question that is being asked, but, rather, answers the real question that a new programmer would be asking if they knew how to ask it

So I guess what I'm saying is, is it preferable in the StackExchange paradigm to answer what the question asker is saying exactly or to be as helpful as possible, to teach what the questioner really needs to learn.

share|improve this question
Rob Hruska's answer actually did appear to succinctly answer the question. – Sam I am Nov 29 '12 at 15:19
@SamIam: In the original question, qwertyRocker was trying to do a static assignment to a class and it wouldn't compile because the variable wasn't assigned statically. jlordo said "use static". RobHruska said "you probably want to make a new instance of the class instead". Don't get me wrong, I like both answers actually (and I upvoted RobHruska's answer), but it's not the verbatim answer to qwertyRocker's question. – durron597 Nov 29 '12 at 15:22
Old Shoe Or Glass Bottle? – AakashM Nov 29 '12 at 15:39
@AakashM: I want to give this question's checkmark to that post, haha – durron597 Nov 29 '12 at 15:54
up vote 9 down vote accepted

It is preferable to help the question asker as best you can.

If that means reading between the lines and suggesting a different approach, then please do so! If you can address both the original question and teach the asker about better methods, so much the better. You have helped the question asker just that little bit more.

In your specific example, the answer that addressed what you call the real question, was awarded the 'helpful answer' flag; the question asker felt that answer helped him most. And that's the whole point of Stack Overflow.

share|improve this answer
+1, but avoid non sequitur answers. – user7116 Nov 29 '12 at 15:14
@sixlettervariables: how about non sequitur comments? :-P – Martijn Pieters Nov 29 '12 at 15:16
"reading between the lines and suggesting a different approach" sometimes ends up with answers like, "properly formatted code and following appropriate design patterns can help with your problem". Or "Unrelated Common Problem X may be affecting your application and here is a solution to it." While yes, they are both "answers" in a loose sense and meet the OP's test of "helpful as possible", they are not encouraged. (I like giraffes) – user7116 Nov 29 '12 at 15:18
Okay, first had to test if this was another 'seems legit' comment. :-) Agreed, non sequitur answers are never helpful, don't use them to pad out your post. – Martijn Pieters Nov 29 '12 at 15:21

Being helpful is good, but remember that the purpose is to make a resource for future visitors as well, not just to help the asker.

Even if there may be a much better solution for the asker's specific problem, there may be future visitors who are looking for exactly what was requested. (Or, more annoyingly, future questions may be closed as a duplicate of the question that was literally asked, even if the answers aren't applicable because nobody answered the literal question.) For their sake, we should try to make sure that there is at least one answer that addresses the question that was asked.

If somebody else has already posted such an answer, then you can just post an alternative. If not, then even if you're suggesting an alternative you should try to also address the literal question in your answer.

share|improve this answer
If I could summarize your answer into one sentence, it would be "do both". Is that about right? This kind of thing comes up more with the questions like "I am a beginner, HELP!" than "I have this very specific problem with Spring and Hibernate blah blah" – durron597 Nov 29 '12 at 15:17
@durron597 Yup, the ideal is to do both, if practical. – Jeremy Banks Nov 29 '12 at 15:21

You must log in to answer this question.

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