29

I just received an SO survey, to which I responded quite negatively. I think current questions are mostly terrible, and current answers are mostly terrible.

Here's an example showing one kind of unhelpful answer that I hate: https://stackoverflow.com/revisions/77208142/1 (it has since been revised to include an explanation, which does make it more helpful).

This is a response to a question about how to speed up some code. The responder posted a new version of the function that was several times faster than the original, and was rewarded with several upvotes and an accepted answer. But the answer is almost totally useless! It doesn't explain the changes that were made, so it helps that questioner with that exact problem, but doesn't help anyone else.

How can SO encourage people to make their answers helpful to other users besides the OP? Isn't that the point?

27
  • 5
    "I think current questions are mostly terrible" -- Could you expand on that? Surely that applies to this case, no? See Why is "Can someone help me?" not an actual question?
    – wjandrea
    Commented Sep 30, 2023 at 22:46
  • 7
    Some people just enjoy building a large mountain of crap. Other than downvoting things you don't see widely useful, I doubt anyone can (or wants to) do anything about it. The owners want volume, no matter the cost, and all the hate against any sort of curation that consistently pops up here suggest that the masses want it too.
    – Dan Mašek
    Commented Sep 30, 2023 at 23:23
  • 40
    I wouldn't say an answer with 2 upvotes is "well rewarded".
    – Thom A
    Commented Sep 30, 2023 at 23:54
  • 7
    What do you mean by "SO"? Are you referring to the company, to the curators, to the community in general, to the platform, to the options available to you?
    – Wicket
    Commented Oct 1, 2023 at 0:15
  • 31
    @ThomA I'd say it is, for 6 hours' worth. Nowadays, I'm lucky to get a single upvote on answers. 2 upvotes in 6 hours is above-average. Maybe it's just me, though. In the "old days", it was easier to get 3 or 4 upvotes in a short time for a good answer, and much easier to get at least one vote, but I don't think people are reading the questions or voting as much. Or else my preferred tags have something to do with it. Not complaining, just noticing to see if others have similar experiences.
    – ggorlen
    Commented Oct 1, 2023 at 2:09
  • 3
    I wouldn't call that answer useless. It answers the question "speed up this specific smsurv function". It's not required to state what makes it faster than the original code, since the question wasn't (despite the original unfocused title) "How do I make any arbitrary function containing a for loop faster?". The question could however benefit from adding context about what smsurv is, and of course, having a useful-to-others title. Commented Oct 1, 2023 at 2:46
  • 3
    @ggorlen SO's traffic has reduced quite a bit recently. This is called "The Fall of StackOverflow" by this post.
    – InSync
    Commented Oct 1, 2023 at 6:08
  • 4
    "How can SO encourage people to explain their answers, so they are generalizable to other questions? Isn't that the point?" More up and downvoting? Being more like Wikipedia and encourage more collaborative editing? Better mission statement? Commented Oct 1, 2023 at 8:51
  • 5
    'Blame & shame' is not necessarily a good thing, but in this case, it seems as if it helped. Your question made it to the front page. 'Terrible' answer was promptly improved. Commented Oct 1, 2023 at 14:11
  • 3
    An example of a code dump. And it isn't the only one (to that question). Commented Oct 1, 2023 at 16:37
  • 2
    my 2 cents: 1. also encourage better questions 2. this was a "code only" answer: code only and link only answer are the problem
    – pdem
    Commented Oct 2, 2023 at 9:51
  • 9
    How do we encourage someone to produce long-term useful content when short-term useful content is so much more readily rewarded in the near term? It can be hard to argue that if you produce a lot of long-term useful content that you'll over time earn more rep, when the user wants more rep now, not 6-8 time units from now. --- It can also be hard to convince users who don't care about rep to care about producing long-term content when they can instead quickly help the user right in front of them directly and move on to the next.
    – Kevin B
    Commented Oct 2, 2023 at 15:24
  • 2
    (cont.) No amount of rep changes, or notices/text, is likely to affect either of those cases. They're both just users wanting to use the site toward their own needs without caring about the needs of the site itself. There's no lightswitch that can be flipped to change the behavior or hint that will magically nudge these users into producing long-term useful content when their actions are mostly selfish and they are getting fulfilment out of them. You could impact the former with changes to reputation rewards, but the latter... not so much.
    – Kevin B
    Commented Oct 2, 2023 at 15:27
  • 4
    If you find an answer that you genuinely think is not useful due to zero explanation, do please downvote it. That's the strongest signal, along with arguably a comment stating that it could be improved, that a post is low quality.
    – TylerH
    Commented Oct 2, 2023 at 19:04
  • 4
    @user2554330 it's up to each user to determine whether they vote on an answer's usefulness or quality in the context of themselves or in the context of some other theoretical user. If I see an answer with no explanation on a question about a topic I'm learning about or struggling, I find that answer not useful, typically. Someone who is an expert in that language might find it useful because they're just better or more familiar with the language/feature being discussed. I downvote based on my interpretation, not this theoretical expert. And each user should do so based on their own discernment
    – TylerH
    Commented Oct 2, 2023 at 19:34

9 Answers 9

26

How can SO encourage people to explain their answers, so they are generalizable to other questions?

Comments sometimes work. Some people just reply that they'll do that next time, and IDK if that happens.

You can even downvote if you want to apply more pressure, especially if that won't make the score negative (if you don't think it deserves it.) The mouseover on the downvote button says "this answer is not useful". A valid interpretation of that is "not useful enough", as in doesn't meet the quality standard you expect for an SO answer.

I've had this happen: I posted a very terse answer that did answer the question, but IIRC only for people with the required background knowledge to understand it, who probably wouldn't have needed to ask the question in the first place. I forget which question (likely something about explaining a performance effect in terms of computer architecture and/or compilers), and I forget how bad it was, like whether it would likely have helped the OP or not. I think it was somewhat better than just posting for the sake of being smug, but I think I was kind of annoyed with such a simple question, IIRC, or something like that. Oh, I think it was going to be a comment, but then I realized it was technically an answer to the question so shouldn't be posted as a comment, so I posted it as an answer. A downvote or two from (what I assumed were) "fools who don't understand my genius" motivated me to edit it into a much longer answer which did explain what was going on in terms more people could understand, from where it went on to get multiple upvotes. (I'm phrasing it for humour, but at the time I felt like my answer didn't deserve downvotes, and that people who downvoted should learn the subject before voting on answers about it or something. Maybe not deserve many upvotes, but it was still technically an answer. Anyway, with hindsight and getting over being maybe grumpy about the question (or the general state of question quality) when posting the answer, it's not totally unreasonable for people to downvote an answer that's not useful to them. And for me to in future take a few more seconds to see if any more thoughts occur about stuff to say before hitting "post".)

I would not recommend mentioning your downvote in a comment that requests improvement; that could come across as holding their answer hostage. Or holding them hostage, since when people have bad reactions to voting, it's often from taking it personally, as if we were voting on them as a user or as a person, not on the contents of their post. (That kind of phrasing, like I'll reverse my downvote when you fix this problem, is ok IMHO on questions with problems like images of text, where that's a clear problem that can be fixed with just copy/paste as text.)

However, you could encourage improvement with a carrot, not a stick, by saying something like

This is a good speedup, but it would help other future readers with similar problems a lot more if you explain what you changed and why. I'd like to upvote an answer that looked like that.

In this case you're asking them to provide an explanation, rather than fix a mistake or explain something differently/better. In past cases of commenting on questions to request improvements, I've more often than not had good results from explaining in comments what bugs or problems or downsides exist in an answer (including saying what the right or better approach would be). Sometimes I end up making an edit myself if the author isn't understanding what I'm saying, and 95% of the time that's well-received, especially when it's a change the author had been trying to make at my suggestion in the first place. So IDK if asking for explanations could tend to go the same way.

Also, most of my experience with this is in the [assembly] tag, where people writing answers that need such improvement are often beginners that are trying to apply the small amount of knowledge they do have. Or experienced users that got lazy with an answer, or that weren't aware of some performance details or tricks.

(Most of this meta answer was written assuming answers from new users, who maybe aren't familiar with what a good answer looks like. Adjust as necessary if scolding experienced high-rep SO users that ought to know better and just got lazy, or didn't have time when they first posted to write a good answer.)

It looks like that's what actually happened in the case you linked. 2 downvotes and a much-upvoted comment shamed(?) the high-rep poster of that answer into editing with a bullet-list of changes that looks like the kind of thing such an answer should contain. The downvoters can now hopefully remove their downvotes.


Isn't that the point?

Yes, absolutely. Code-only answers without even a changelog summary require way more work for any future reader to figure out whether any of the same fixes could help for their problem, since they'd have to first read the question in detail.

When change to a few lines are marked with comments inside the code block but there's no text explaining why, that's only slightly better. Further along the sliding scale, there is some actual answer about why, but it's buried in comments, possibly inside a multi-page code-block.

7
  • 3
    From quite some experience I've had posting comments like this on code-only answers from Late Answers or VLQ (and giving up on it), I can say with certainty that comments asking for more detail in an answer are not worth the screen space. They usually get ignored and stick around forever/until someone flags them as NLN and nothing ever gets edited. By current site rules it won't (and shouldn't) be deleted so there's no incentive for the answerer to care, especially if the answer is positively scored or even accepted. Until there is such an incentive I don't see this changing.
    – LW001
    Commented Oct 1, 2023 at 22:08
  • 2
    I do agree with your point of adding to the answer by editing it or pointing out a problem/note in a comment - Of course that's well received, you're doing their work for them - but by that point why not just create your own more general answer and get proper attribution for it...
    – LW001
    Commented Oct 1, 2023 at 22:16
  • 7
    Can you clarify this point: "You can even downvote if you want to apply more pressure, especially if that won't make the score negative". If my answer is downvoted from 0 to -1 I might find that more irritating than being downvoted from (say) 5 to 4, but why should any potential downvoter care about the answer's current score?
    – skomisa
    Commented Oct 1, 2023 at 23:49
  • @skomisa: Many people disagree with voting towards some absolute score you think a post "deserves", but that's what I'm proposing. If it's currently higher than 0, downvote. If not, don't, especially if you're worried about scaring away a new user who could become a valuable contributor. (I'm not suggesting upvote if negative, though, unless you think the answer is useful enough in its current state.) Another reason to keep the score non-negative is to not send a signal to future readers that it's wrong, if that's not the case. Commented Oct 2, 2023 at 0:05
  • 3
    OK, but by that argument doesn't it follow that you might upvote an answer that you feel has been unfairly downvoted, yet downvote that same answer if you feel has been undeservingly upvoted, based on its current score? That just doesn't feel right. (That said, I have upvoted questions that were getting pounded due to the meta-effect, just to ameliorate the injustice of the situation in that special case, so I suppose I am somewhat sympathetic to your view.)
    – skomisa
    Commented Oct 2, 2023 at 1:18
  • @skomisa: There's some hysterisis to my mental heuristics for when I want to vote. And even if an answer is currently lower than I think it really deserves, I still won't upvote it unless I think it's at least very close to deserving my upvote in an absolute sense, or if it had had no votes either way yet. So I don't go around upvoting lazy answer that I feel sorry for! However, I do sometimes refrain from downvoting on answers for reasons other than purely my own absolute (non-relative) standards for evaluation of answer quality. Commented Oct 2, 2023 at 1:39
  • 3
    I think this answer hits the main points. I just got lazy when I answered and I was shamed [...] into editing with a bullet-list of changes that looks like the kind of thing such an answer should contain. That's exactly what happened. Commented Oct 2, 2023 at 15:55
35

I think current questions are mostly terrible, and current answers are mostly terrible.

I would tend to agree with that. The questions are typically not directly useful to anyone but the person that asked them. (Let alone answerable at all.) And the answers are typically not useful to anyone but the person who asked the question.

... and was rewarded with several upvotes and an accepted answer.

Unfortunately.

But the answer is almost totally useless!

Almost. Certainly from the perspective of other readers.

How can Stack Overflow encourage people to explain their answers, so they are generalizable to other questions? Isn't that the point?

OK, so let’s unpack this.

What do you mean by Stack Overflow?

The way for us (the "Stack Overflow community" or whatever) to encourage people to explain their answers is to upvote when they do, and downvote when they don't.

And maybe comment to explain the downvotes. But that leads to friction, heat, accusations of being "not welcoming" and so on. So most people who would care to downvote on answers have stopped commenting... and in many cases stopped caring.

But here's the problem. Stack Overflow is not a gated community. Anyone with a Stack Overflow account and more than 15 reputation points can upvote (and anyone with 125 reputation points can downvote) questions. And any user can vote to accept an answer to a question they asked. So we have a significant percentage of users who will upvote answers that are not "good" answers. We cannot stop that. And unfortunately, that means that people who post poor answers are rewarded and encouraged to repeat their actions.

Either way, we (the "Stack Overflow community") have little control over this.

And on the issue of writing generalizable / generalized answers. Writing a generalized answer to a particular question is largely a waste of time. The thing is that an equivalent answer has probably been posted before, for an older question. Rather than people spending their time writing the same answer over and over again, it is more useful to close the question as a duplicate, and add some comments to explain how the older Q&A addresses the question.

But that requires a level of comprehension from the OP, which is frequently absent.


But what about Stack Exchange; i.e. the folks who run this business that hosts Stack Overflow. What could they do?

First of all, do they care? Frankly I don't know. I will grant that many employees probably do care a lot, but they are also probably constrained in what they can say publicly, while keeping their jobs! But at the business level, I suspect that the company is 99.9% focused on turning a profit in the short term, and that translates to ad revenue.

But what could they do, assuming that they actually did want to address this problem?

Well, one thing they could do would be to figure out ways that:

  1. People were better rewarded for posting consistently good answers. Back in the day, the company used to give away coffee mugs, tee-shirts, etc. when people reached milestones. And... hey... what about paying people to answer questions?

  2. People were not rewarded for posting poor questions and answers. For example, maybe Stack Exchange could outright ban all homework questions... because very few newbie question posted these days contribute to the stated goals of Stack Overflow.

  3. People were discouraged from upvoting poor questions and answers. I know... that's undemocratic. But the "right to vote" is not the same as the ability to vote wisely. Maybe only people who have earned enough reputation points from answering should be allowed to vote?

Following from 2, if there is business value for Stack Exchange in supporting newbie / homework questions, how about SE up a separate site to handle them with a reward system that suitably incentivizes people who are good at teaching newbies to answer the questions. (I don't have any idea what that reward system would look like!)

Or just give students a Stack Overflow based AI and suggest that they just ask their teachers (!) if they don't understand the answers that the AI gives them.


But frankly, I think Stack Overflow (as we know it) is so far past the time when these problems could be solved that it is pointless to even try.

7
  • 4
    One approach to "the gates have failed" is to move to somewhere else where it hasn't happened yet, such as Codidact. This allows the opportunity to help build a community and define what its gates should look like, making use of expertise gained from the previous experience. Commented Oct 1, 2023 at 9:13
  • 8
    I'm still hoping too. But each time I look, Codidact is a cricket farm ...
    – Stephen C
    Commented Oct 1, 2023 at 9:23
  • 6
    I am there for the sake of being the change I want to see in the world. I know what questions are missing, so I might as well ask them. There is superior Markdown/HTML support and the opportunity to avoid the baggage of previous poorly-asked questions, and plan out ahead of time the right set of questions to explain the problem space. I would like to encourage you to join me. Commented Oct 1, 2023 at 9:32
  • 4
    @KarlKnechtel: thanks for the suggestion. As Stephen said, it's still a little light on content, but maybe it will improve. And as Stephen also said, it's unlikely SO will. Commented Oct 1, 2023 at 10:29
  • See the answer below from Fe2O3 for an interesting perspective on the potential benefits of homework questions. (Just to be clear, I realize that your answer is not taking a position either way on whether homework questions should be banned.)
    – skomisa
    Commented Oct 2, 2023 at 1:30
  • 5
    Are we damned if we do, damned if we don't? If we comment when we downvote, we're accused of being non-welcoming. If we don't comment, people complain about drive-by downvotes with no explanations.
    – Barmar
    Commented Oct 2, 2023 at 20:35
  • 1
    @Bamar Re "If we comment when we downvote, we're accused of being non-welcoming", I suspect that any accusations are due to the tone or content of the comment rather than the mere existence of the comment per se. And it is always possible to post a critical comment without directly associating that to your (anonymous) downvote.
    – skomisa
    Commented Oct 3, 2023 at 1:49
31

Encourage how-to questions over debugging questions

I want to scream every time someone asks a question of the form "How do I do _____?" and gets a comment saying something like "Stack Overflow is not a free coding service; please show us your attempt."

Here's the problem with blindly asking people to show an attempt: it rarely clarifies the question1, and it very frequently results in an answer explaining how to fix the code that the asker wrote rather than how to do the task. Often, the form of this answer is a copy-paste of the code from the question with the problem fixed.

Lots of askers love this: they don't even need to implement the solution into their code, because it's already done! Upvote and accept for the answer! But the next person with that problem doesn't have the asker's code; they have their own code. Often, with these, I've needed to use a diff tool to figure out what the actual answer was.

We need to not discourage the sorts of reasonably focused how-to questions that make it difficult to just fix the bug in the asker's code and dump the code into a low-effort answer, and instead encourage a thoughtful, well-explained answer that will be useful to future engineers with the same problem. These questions take more effort to answer...and that's a good thing, because that effort will be more useful to people with the same problem in the future.


1 Yes, I know there are exceptions to this. But they are generally cases where the reason that more information is to figure out 1) if the question is a duplicate, and 2) if so, which duplicate target applies. The canned comments don't really get into this, and tend to convey the impression that Stack Overflow is a debugging helpdesk rather than a library of reusable knowledge.

18
  • 5
    99.9999999% of "How do I do _____?" questions are asking how to fix their code, not to be taught how to fish. Without any code such a question is bad and unanswerable; with code it's just bad; either way it's so narrowly scoped as to be highly unlikely to ever be useful to anyone in the future. So the problem is not "show your attempt" comments, the problem is that the quality of the average question on Stack Overflow is so low, and that's not going to be fixed by discouraging people from posting such comments.
    – Ian Kemp
    Commented Oct 2, 2023 at 9:42
  • 9
    @IanKemp Couldn't that be in part due to this attitude, though? People have been repeatedly told that they must show an attempt, so anyone who reads the site before asking has a "what's wrong with my code?" question, because that's what they've been told to ask. At least how-to questions can be answered in a general way, even if the asker would prefer a tailored solution (you may not get the accept vote, but you'll get upvotes later if it's useful). I'm also not saying it's just the comments; it's everything that encourages debugging logic errors and discourages how-to questions.
    – Ryan M Mod
    Commented Oct 2, 2023 at 10:27
  • I generally agree with what you wrote, but you don't address the question: how to encourage good behaviour? Commented Oct 2, 2023 at 13:03
  • 3
    @RyanM The numbers of those possibly being turned away by the "show your code" "rule" pale in comparison to the numbers of bad questions that it allows us to immediately shut down. At the end of the day, everything - and I really do mean everything - comes down to question quality. A lack of bad questions is why "show me the code" wasn't a "rule" for the first half-decade of SO's existence - because it simply wasn't necessary.
    – Ian Kemp
    Commented Oct 2, 2023 at 16:32
  • 1
    @user2554330 That's a valid objection to this answer, and one I wish I had a more concrete answer to. Part of what I want is an attitude shift toward what makes a question good. I don't really know how, specifically, to achieve that, though. I can make some difference at the margin, by writing on meta and by messaging people on the main site, but trying to change the thinking of a large community is hard. And so I'm suggesting a general direction rather than specific changes, in the hope that someone can figure out how to move the site in that direction.
    – Ryan M Mod
    Commented Oct 2, 2023 at 20:40
  • 1
    @IanKemp Sure, I agree with all of that. But the bad questions that need to be shut down tend to either 1) be easily shut down for other reasons (unclear, lacking focus, off-topic, etc.), or 2) have code in them (and are often just spotting a logic error, and totally useless to future readers). So the only marginal questions that are shut down by a "show your code" rule tend to be the good ones. Basically, I'm saying to focus on quality directly rather than using an inaccurate proxy metric like whether the question contains code.
    – Ryan M Mod
    Commented Oct 2, 2023 at 20:44
  • 1
    In my experience questions of the form "How do I do _____?" often do not include code or any evidence of research effort. What makes me want to scream is when people feed the beast and answer those lazy and mediocre questions rather than downvote them (because they do not "show any research effort"), or close vote them because they are off topic. Furthermore, the help documentation on SO is very heavily oriented towards questions containing code. I think your apparent support for "How do I.." questions without code would represent a huge shift in SO's existing policies.
    – skomisa
    Commented Oct 3, 2023 at 2:11
  • 7
    @skomisa I'd point you to this well-received answer from a Community Manager in 2014 as evidence that what I am describing has been the policy for a very long time (in particular, note the very clear statement that "Trying to maximize effort actively subverts the purpose of this site"). For additional (recent) discussion, see The highest voted questions do not have research effort; this is a bad role model for new users. You are conflating a lack of research effort (asked a duplicate) with a lack of problem-solving effort (didn't include code).
    – Ryan M Mod
    Commented Oct 3, 2023 at 3:04
  • @RyanM And I'd point you to the Help Center's article How Do I ask a Good Question?. It has a section titled "Introduce the problem before you post any code" which is strongly implies that your question will contain code. A link to a meta post from 2014 is not SO policy; it represents the opinions of a few that your average user is never going to see. Far more users are going to see Help Center articles which do represent SO policy. If it's SO policy to support "How to..." questions then why doesn't the Help Center documentation reflect that?
    – skomisa
    Commented Oct 3, 2023 at 18:21
  • 1
    @skomisa that article isn't outlining what is and isn't off topic.
    – Kevin B
    Commented Oct 3, 2023 at 18:23
  • 1
    @TylerH I'm objecting to the ivory tower mentality that believes consensus on some issue in 2014 on Meta means it represents SO policy. It doesn't. Nobody outside of Meta knows or cares about "decisions" made here. If SO has a policy on "how do I...", or anything else, then unambiguously put that in the Help Center documentation. And if something is SO policy, why isn't it in the SO documentation? Consensus on something on Meta should be a means to an end - specifying it in SO documentation - rather than viewed as an end in itself. Few SO users know or care about "policy" decisions on Meta.
    – skomisa
    Commented Oct 4, 2023 at 16:57
  • 2
    @skomisa "Nobody outside of Meta knows or cares about "decisions" made here." How is that statement relevant to this situation, where someone on Meta is asking how the Meta community can help the site? This is not an "ivory tower mentality", it's "how Stack Exchange sites are designed to decide on various community-specific practices".
    – TylerH
    Commented Oct 4, 2023 at 17:04
  • 4
    @skomisa As for why something is not in the Help Center (assuming that's what you mean by SO documentation, which is the name for a dead product), there's been lots of discussion over the years about modifying the Help Center to have more stuff or not, and it's usually stated that that's "hard" and so we just rely on things like faq.
    – TylerH
    Commented Oct 4, 2023 at 17:05
  • 2
    @skomisa All that being said, your response just crystalizes that your position seems now to be "Hang on let me keep moving the goal posts". If you would like a policy to be "official" make a post asking for that and describing in detail what you want that to look like (e.g. make a Help Center article). Until then, you gotta deal with the hand your dealt. The best-received position that has any kind of consensus is a post from a CM from 2014. If you wanna do better, do better, don't just complain that a CM's post from 2014 isn't good enough.
    – TylerH
    Commented Oct 4, 2023 at 17:07
  • 3
    @skomisa It's also important to note that the How do I ask a good question? page is advice for askers, not rules or policy for what questions are permitted or useful. But even if it were, it specifically says "Not all questions benefit from including code".
    – Ryan M Mod
    Commented Oct 4, 2023 at 21:03
7

What you're asking is one of the fundamental, but unanswered, questions of the Stack Overflow model, because there are so many ways to argue this particular cat, for example:

  • Asking for suggestions that I can try (language from the SO question being discussed) invites unfocused and opinionated answers, which are of course proscribed here. Yet SO is entirely about answering programming questions, and all questions will involve some aspect of variability.
  • If the question doesn't provide code, that precludes answerers from making suggestions relevant to the asker's circumstances, and thus invites overly vague answers - which are again proscribed. But if code is supplied in the question, that encourages answers that are "too focused" and lacking explanation - exactly the type you're concerned about.

Essentially there's no hard and fast rule for what's "good" or "on-topic" here, because there cannot be; different contributors will fall in different areas of a continuum. For example, based on the above points, one person could honestly believe that the question being discussed is a perfectly good one; while another could equally honestly believe that it's off-topic.

In lieu of a definitive answer to the difficult question I outlined in the first paragraph, upvotes, downvotes and comments are the mechanisms that have been implemented to allow individual contributors to express their particular opinion on content quality. And I personally think they're about as fit for purpose as we can get.

4

If you are mad at seeing a bad answer getting rewarded with 1 or 2 upvotes, consider offering a bounty to attract attention to the question. Select a reason, like looking for a quality answer. Use a custom reason to include detailed criteria, like a detailed explanation, citations, or whatever you consider a good answer should include to the specific question.

Related

5
  • 6
    I wasn't particularly mad about the answer I linked to, it was just a convenient example at the time I posted. It has since been improved. I was mad that the original style of this answer is so prevalent. I think offering bounties on every question like that wouldn't really be feasible. Commented Oct 1, 2023 at 9:47
  • 1
    I think that answers that are being incrementally improved should be discussed separately... they might be seen as related to "fastest gun in the West" bias / behavior / problem.
    – Wicket
    Commented Oct 1, 2023 at 13:37
  • 4
    Isn't that counter-productive? Bounties tend to increase the amount of answers quality or non-quality ones. I often find a question with a bounty gets even more lower quality answers than usual. Presumably because users just want a shot at the bounty and do the bare minimum to try and get it. What we need is increased scrutiny on posts, not just more posts. We have enough sand.
    – VLAZ
    Commented Oct 2, 2023 at 7:39
  • @VLAZ I haven't seen that as something that commonly happens. Thanks for mentioning it. It looks like SO got too much-unwanted attention.
    – Wicket
    Commented Oct 3, 2023 at 2:10
  • 1
    I remember that happening on SO's most-upvoted question last year (Jan 20, 2022): it already has an excellent answer, and the bounty in that case wasn't looking for new answers, it just wanted to promote the question some and reward it. But while the bounty was open, it got 1 off-topic answer to the wrong question, and 2 very lazy answers. (sort by date and scroll way down the list of deleted answers; the OP and I keep an eye on question, with @VLAZ's help on those delete votes ). After I pointed this out to the bounty offerer, they awarded it Commented Oct 3, 2023 at 4:52
1

How can SO encourage people to explain their answers, so they are generalizable to other questions? Isn't that the point?

Sometimes producing a general answer is the point, and sometimes you're instead specializing the generic to the actual question that was asked. The latter is also important because it's not necessarily easy to understand how to do the specialization when you're less experienced with a particular language/set of tools. Explaining why you've specialized the generic in the way you have in the answer produces what I feel is a very good answer; both the questioner and other later readers can learn from it.

Linking to the generic answer on the area (as part of the specialization) isn't a bad idea. It would often make the answer better, perhaps like this:

This is a special case of this question, but in your situation you should bear in mind these other confounding factors:

  1. Factor A
  2. Factor B
  3. Factor C

...

It's also better to not just post code, but to also post explanation anyway. That can be done with comments in the code and/or links.

1
  • 4
    I agree with what you said, but you don't address the question: how to encourage that behaviour? Commented Oct 2, 2023 at 12:59
-14

Here's an example showing what I hate about well-rewarded answers [...] But the answer is almost totally useless! It doesn't explain the changes that were made, so it helps that questioner with that exact problem, but doesn't help anyone else.

If you hate this (referring to that particular example you gave) enough to complain about it on meta, I don't understand. For one thing, there is no rule that says that you must explain code that you put in an answer if the code alone is enough to solve the problem. It would be real nice if people did explain their code, but as far as my understanding goes, it's not a hard rule. See also When to flag an answer as "not an answer". And, why be so stuck on it? This is prime low-hanging fruit to make the internet a better place and reap some easy rep if you have the subject-matter-expertise. Write a better answer that expands on that answer by explaining how it works.

Not speaking about that particular example, yeah, lots of questions are poor, and don't follow basic guidelines outlined in the Help Center. Same with answers. I flag tons of non-answers every day from the New Answers to Old Questions 10k tools every day, sometimes up to 100 on the same day. What else is new? I'm tired of saying it, but I'd like the site UI to do a better job of promoting its own Help Center.

4
  • 4
    "Write a better answer that expands..." I'm not happy with this proposal (even though it is in tradition with SO practice) because that would result in unnecessary duplication of content. In my mind I rather imagine something more like Wikipedia where we all work together on a single coherent answer (possibly with different alternatives) and authors names are nothing but footnotes. That's not SO of course. Here instead of writing another answer I think that good answers would indeed explain their code. Commented Oct 1, 2023 at 8:57
  • 19
    "And, why be so stuck on it?" Because the purpose of the site is to build a library of high-quality answers. "Write a better answer that expands on that answer by explaining how it works." This model only goes so far. From the library-building perspective, it would clearly be better not to duplicate the code unnecessarily simply so that there can be an explained version in addition to the now-redundant unexplained version. Commented Oct 1, 2023 at 9:11
  • @NoDataDumpNoContribution yes, and my point is that since that idealism is not what SO is, you can at least contribute the lesser evil by writing that "good answer" that someone else didn't. Personally, whether I would do this depends on how much I think an explanation would contribute (in accordance with meta.stackoverflow.com/a/354282/11107541)
    – starball
    Commented Oct 1, 2023 at 20:40
  • 2
    @starball I have not enough free time for lesser evils. Content duplication is not something I want to do. Given that I have only time to vote on the current quality and move on. Commented Oct 2, 2023 at 9:29
-17

How can SO encourage people to explain their answers, so they are generalizable to other questions?

One possible solution might be to make the cost of DV'ing proportional to the accumulated reputation of the user who DV's. Not everyone has been an SO user since its beginning. While "time invested" is to be considered, the posted reactions of some long time SO users give one the impression that they consider their judgement infallible and unassailable. It may cost a long time user 0.00001% of their rep to DV a post (question or answer) while a neophyte must consider whether or not 0.8% of their rep is worth losing to DV the same posting. And, waiting for a UV from a long time user is like waiting for Godot.

Case in point:
Recently a job seeker posted something like the following:
(Original post not accessible as it was remove owing to its overwhelming number of DV's.)


From a job interview quiz question: "How to print 'schoolbus' given this code".
I couldn't think of an answer to this. Is there one?

    if (condition)
        printf( "school" );
    else
        printf( "bus" );

What is the 'condition'?


Those who may-or-may-not have realised the solution started DV'ing both the question and (after the Q was grudgingly re-opened) DV'ing the answer that provided the not-obvious solution. (To be fair, the inexperienced OP had tagged 3 different languages, but the code is/was clearly C. "Improving the question" would be simply a matter of removing the Java and Python tags for the OP, or asking the OP to pick a language. This was not the go-to response from many readers.)

This was a great question, imo, because, for better or worse, it represents the kinds of questions newbies may encounter as they attempt to enter the workforce. Further, it represents poorly written code that exists in the real world and will be encountered during one's career.

I try to imagine the infamous "Quake Inverse Square Root" algorithm first surfacing on SO in recent times; how would it be received? My sense is that it would have been gleefully squashed almost instantly.

"How can SO encourage people to explain their answers?" Implement a "rep threshold" exceeding which removes the user's power to DV and encourages hi-rep users to mentor newbies (via comments) toward improving their own questions or answers.

23
  • 1
    What was the intended answer? fork() == 0 or something else that returns twice, on a system where the child runs first? (Either by chance or by guarantee). Or if (jmpbuf = setjmp(), x==0) or something and a later x=1; longjmp(jmpbuf), with suitable x, perhaps static volatile int if needed? I tried googling since I can see deleted SO questions, but didn't find it. Commented Oct 2, 2023 at 1:52
  • 1
    Re: the Quake reciprocal sqrt algorithm: you might be surprised: Is it still worth using the Quake fast inverse square root algorithm nowadays on x86-64? was a well-asked question from 2022 about it, and I was online to answer it when it was posted; a good answer helps voters see the value in a question. It got 2 upvotes the day it was posted, and 5 more over later months. Why does clang make the Quake fast inverse square root code 10x faster than with GCC? (with *(long*)float type punning) was a couple months later Commented Oct 2, 2023 at 1:54
  • There's also 2019's Is it possible to write Quake's fast InvSqrt() function in Rust? as a type-punning exercise. Commented Oct 2, 2023 at 1:57
  • 3
    @PeterCordes The answer to the OP's question: conditional is !printf( "school" ). The function returns the number of characters printed. The NOT makes this 0, so the else body is executed... The candidate is being tested for thinking outside the box.
    – Fe2O3
    Commented Oct 2, 2023 at 2:00
  • 1
    "... which removes the user's power to DV and encourages hi-rep users to mentor newbies (via comments) toward improving their own questions or answers." ... comments which they will ignore ... because there were no DVs to get them to pay attention. But either way, the real purpose of DVs is to flag poor quality questions and answers for >other< users (e.g. real newbies) and for search algorithms. If you remove the people who are the best judges of quality from voting (because they have knowledge) then the quality just gets worse and search results return more rubbish Q&As.
    – Stephen C
    Commented Oct 2, 2023 at 2:00
  • @Fe2O3: Oh, you can just add extra printing code? Lol. I was interpreting it as needing a way to make those printf calls do the printing, because that's possible but a lot trickier. Commented Oct 2, 2023 at 2:04
  • @PeterCordes The takeaway from some months of experience of SO is that type punning is to be shunned and abhorred as if it was The Dark Side. Unfortunately, in the real world of implementation, one finds companies in 2023 that still have older compilers they use, and mountains of non-C23 compliant legacy code...
    – Fe2O3
    Commented Oct 2, 2023 at 2:04
  • @Fe2O3: There are lots of highly upvoted questions and answers about how to correctly and safely do type-punning, e.g. with memcpy or C++20 std::bit_cast<>, or with unions in C99 and later C but not C++. If you're talking about pointer casting + dereference, then yes that's correctly shunned as non-portable (or requiring gcc -fno-strict-aliasing to make it safe). If that happens to work anyway, it's only because GCC goes out of its way to try to notice common unsafe patterns over a small scale and support what the programmer meant, despite the UB. Commented Oct 2, 2023 at 2:08
  • 11
    It's not clear to me how severely reducing the only possible active disincentive to posting bad answers (being downvoted by experienced users) would encourage people to not post bad answers. I agree that comments encouraging users to explain their answers would be good, but this seems pretty unlikely to helpfully achieve that goal.
    – Ryan M Mod
    Commented Oct 2, 2023 at 2:08
  • 6
    Anyway, I have to agree with RyanM here. Are you sure you're answering the right question? The problem you're trying to solve appears to be excessive downvoting on posts you think don't deserve it, by discouraging downvoting on answers in general. That's not what this meta question is about. (Or if you're seeing a connection, you haven't explained it.) Commented Oct 2, 2023 at 2:14
  • 7
    Sorry, I don't follow; how does removing downvotes "disabl[e] the ego-stoking motivation of accumulating even more points"? You don't get points for downvoting; you lose them for downvoting answers. Your solution, as I understand it, would likely result in high-rep users having more reputation points, not less.
    – Ryan M Mod
    Commented Oct 2, 2023 at 2:30
  • 8
    It's well-known that people upvote wrong answers without checking them, especially when they come from reputable users. But the initial version of dbush's answer wasn't code-only, and had 2 bullet points of "explanation". Unless that was edited during the grace period. In this case it had the shape of a good answer, and seemed plausible. The fact that it was upvoted even though the code was wrong is a separate problem that seems only loosely related to rewarding answers that obviously lack explanation. Commented Oct 2, 2023 at 2:32
  • 1
    Re: portability. I still don't see what that has to do with type punning and your claim that it's "shunned and abhored" on SO. You still haven't clarified if I guessed right that you're talking about unsafe/incorrect ways to do type-punning. There's no reason to use those in SO answers. Not all code-bases suck; some are brand new hobby or commercial projects that don't yet have buggy code that's only safe with gcc -fno-strict-aliasing. IDK why you're explaining the concept of legacy codebases to me. Stack Overflow answers should be clean, not things that only belong in legacy codebases. Commented Oct 2, 2023 at 2:37
  • 1
    it's the nuances of THIS compiler that one must understand and work with - Yes, exactly, and GCC and Clang only usually but not always compile *(int*)float the way people hope for, unless you use -fno-strict-aliasing. If you use a compiler other than MSVC, you've either already given up and compile with -fno-strict-aliasing, or you need to avoid anti-patterns and use std::bit_cast or any of the older safe ways to type-pun. See for example Why does glibc's strlen need to be so complicated to run quickly? Commented Oct 2, 2023 at 2:41
  • 2
    Most of my time interacting with answers from new users in [assembly] tags is basically mentoring, often leaving mini code-reviews in comments, pointing out bugs and/or inefficiencies. (If I engage at all.) I agree, it would be better if more people did this, but that seems only loosely related to your example of upvotes on wrong answers, and I'm not at all confident that not being able to downvote would encourage more people to comment. (In fact I expect the opposite, less engagement overall with answers if the tools for dealing with poor ones stop working.) Commented Oct 2, 2023 at 3:13
-33

How can we encourage helpful answers?

Consider leaving us alone.

There's something called "time", and if I'm willing to give X time to solve part of the problem, that's net-good. If you're going to demand 2X from me, you'll get 0X.

It costs you 0X to just move on with your day.

One thing you could do, if it bothers you, is make a better title. "Useless to most" questions can be a problem, but I think it's not remotely as much if they simply don't show up in search results. Often, I see on SO and elsewhere a general title for a super-specific question - that's terrible. Here's where I'm hoping the AI titling tool will shine.

13
  • 16
    I'm not sure if posting suboptimal answers is really costing everyone else 0X. At least, it makes it harder to find good answers. And it makes me invest more time when looking for my own problems because it can't easily be seen if the answers solves also my problem. So for the goal to build a library of good questions and answers, it's much better to provide answers that are as good as you can write them.
    – BDL
    Commented Oct 1, 2023 at 13:04
  • 11
    If you're doing to demand 2X from me, you'll get 0X - That's usually fine. If an answer has a brilliant non-obvious technical solution to a semi-general problem embodied in the code, it's worth the trouble for someone else to edit in an explanation. But that's very rare. Usually it's just another iteration of a similar problem, nothing new to see here, and Stack Overflow as a whole doesn't benefit much from the answer's existence. Also, is it really so important to answerers that they answer a fixed number of questions with their time, and can't answer fewer better? Commented Oct 1, 2023 at 13:18
  • 4
    (Usually the only value in such an answer existing at all is to keep question-askers happy and coming back to ask more highly-specific questions for an expert to apply some general principles for them. In terms of value to the community (not "site traffic" metrics), potential long-term from this asker also posting good answers to other questions they do know answers to, or asking better questions later. We don't yet have an AI search that makes the clutter of such questions a non-problem, as @BDL says.) Commented Oct 1, 2023 at 13:21
  • 1
    @BDL It takes seconds to scroll past an answer you find useless. That's the cost imposed on you, compared with cost to OP and others to having no solution at all. In fact I am currently withholding an answer to a genAI.SE question I have that could help others precisely over this hawkery over incomplete answers. Something can be much better than nothing. Of course you aren't without a point, but its extent is exaggerated. Commented Oct 1, 2023 at 13:57
  • @PeterCordes If the code is a copy-paste solution to OP's problem, it's useful. The appropriate action is to handle the problem case-by-case, rather than seeing a code-only answer and automatically hammering it. Of course there are problematic code-only answers. Commented Oct 1, 2023 at 13:58
  • @PeterCordes "is it really so important to answerers that they answer a fixed number of questions with their time, and can't answer fewer better" this assumes that every day I have X time to devote to Stack Overflow. Or how about, I'm busy this entire week, and I see a question that I can spare a minute for but not any more, and if I don't do it now, I'll have no motivation to do it later, or will forget about it entirely. Commented Oct 1, 2023 at 14:00
  • 13
    Yeah, choosing to not answer instead of posting a low-quality answer would leave the OP unhelped for maybe another few hours. If it's a non-trivial question that you figure a lot of people wouldn't know how to answer, or it catches your interest, but you don't have time to write even one sentence of explanation why, then sure, an answer with good code but zero explanation isn't terrible if you don't do it all the time. But don't expect many upvotes in most such cases, and expect to see a comment requesting improvement (which you can maybe get to next week.) Commented Oct 1, 2023 at 14:27
  • 2
    I think you missunderstand, it's not about force person who answers to explain everything but at some serious topic it could be usefull way to mark answer for other people to try explain what is happening in this code, for sure author would make it faster but other people also can ask for edit/improve question so why not do it same with answers Commented Oct 1, 2023 at 19:29
  • 1
    "another few hours" or, never. I don't mind requesting clarifications and lack of upvotes, it's the downvotes. For the record, I've never written a code-only answer. As someone who asks uneasy questions, I'd prefer someone to just dump something rather than be discouraged and leave me answerless. Commented Oct 2, 2023 at 10:40
  • 1
    @OverLordGoldDragon: Like I said in my first comment, if the question is yet another repeat of a common question that's just a matter of applying well-known stuff to a specific case, someone else will also know the answer. If the question is harder, it's appropriate to be more generous to an answer if it does actually answer it, even if not well. Commented Oct 2, 2023 at 16:58
  • I think this whole discussion is biased towards questions with 1 million views and 8000 upvotes. On those I expect answers to read like textbooks. However, the vast majority of questions are so specific that an answer that just provides a pointer to the right direction, or even just the right vocabulary to solve the problem will be the best and only answer that will be posted, and the 2x vs 0x argument applies
    – julaine
    Commented Oct 3, 2023 at 6:23
  • @julaine Even a question that has 5 views benefits little from answers that are blocks of code with no explanation.
    – TylerH
    Commented Oct 3, 2023 at 19:43
  • @TylerH the 'block of code' can bring you much closer to the answer than no answer. Some tags are so often about finding the right function or configuration in a sea of them. A perfect answer would explain it too, but perfect is often the enemy of good.
    – julaine
    Commented Oct 4, 2023 at 5:27

You must log in to answer this question.

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