21

This is a situation that I have run into a few times during my experience on StackOverflow.

A user - often times a beginner at a certain technology - will ask a question.

I'm trying to do xxx. I've tried the following, but can't get it to work.

Sometimes, I'll see other users step in and throw a bunch of code at the user, saying "Do it like this." These answers can be over-complicated, or just unnecessary for what the user is trying to achieve. I think sometimes we get overzealous and do an unnecessary amount of work just to answer simple questions. It's not inherently harmful to the community, but there's a balance between complexity and helpfulness that we should try to maintain.

In contrast, this is a perfect example of what I think you SHOULD do in an answer. The poster had nice, clean code, and they explained it in detail. Maybe I'm just visiting the wrong tags, but I see too many answers that just throw code at the author without much of an explanation at all.

We all want to be good programmers, and answers that explain concepts well, or WHY you should do something in a certain way, can be one of the best methods to help someone in this regard.

Apart from How to Answer, are there any good community guidelines that you try to follow when answering questions on SO? Any incredible answers that you try to model after?

8
  • 16
    "I have this code, but it's not working. How can I fix it?" That question would/should be closed and downvoted, not answered.
    – Braiam
    Commented Dec 22, 2015 at 20:23
  • 3
    I'm simplifying, of course. Often the asker does make an attempt with their own code, but they are just missing a key element Commented Dec 22, 2015 at 20:24
  • 9
    Dumbing-down an answer to match the experience level of the OP is not wrong. But there's a practical limit, you actually write an answer for the next umpteen thousand programmers that google the question. Write for them first. Commented Dec 22, 2015 at 20:31
  • 9
    It happens sometimes.
    – user4639281
    Commented Dec 23, 2015 at 6:10
  • 10
    'I'm trying to do xxx' - That can't be good. Commented Dec 23, 2015 at 14:07
  • By the way, I'm honored that one of my answers was used as a "perfect example" of a good answer. I admit that I didn't follow the link to the answer when I first commented, and was confused by the votes it received since I went to sleep yesterday until someone told me that it was referenced here. Thanks for that :)
    – user4639281
    Commented Dec 24, 2015 at 0:04
  • 1
    Of course! It started off as a good answer, but your edits made it great! Commented Dec 24, 2015 at 0:05
  • 1
    Sometimes it feels like person answering the question rushes to much with the answer - "there is your code with no explanation", sometimes it seems that this is exactly what OP wants - "code that will work, who cares how". Both times I sigh in sadness. On the other hand the if the answer is well explained but simply very long I might not have enough time to read it now. I would like to see tl;dr section and then explanation and refences. But I totally agree the last two sections are a must. As programmers we must be able to explain what we are doing and why.
    – Olga
    Commented Dec 25, 2015 at 19:16

1 Answer 1

21

This is a judgement call. It's highly context dependent. There's no way to create universal guidelines that would be applicable to all posts and also specific enough to mean much of anything.

You, as a voter, need to judge each post on its own merits. You'll need to determine if the explanation provided is sufficient to help those looking at this question solve the problem described. Some problems are inherently simple, and need very little to no explanation. Other problems are complex, or for whatever other reason it would not be reasonable to assume someone with the problem/question at hand would find a sparse explanation adequate.

3
  • I think you're right. I guess what it boils down to is, how do we better encourage people to write good answers, that fit the context of the question. Or, is this just an inherent flaw with this model of Q&A, and ought we not worry about it? Commented Dec 22, 2015 at 20:36
  • 6
    @AndrewBrooke You downvote answers that don't do it well, and you upvote those that do. Of course, most people just upvote everything, and don't downvote anything, but in theory, people would only actually upvote quality posts.
    – Servy
    Commented Dec 22, 2015 at 20:37
  • 9
    yeah. I'm learning that there's quite a distinction between answers that might be right, and answers that are "good," and hence, deserve an upvote. Thanks for your input! Commented Dec 22, 2015 at 20:41

You must log in to answer this question.

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