42

Sometimes an answer can solve the OP's practical problem although it does not address the OP's exact question. Should I post answers like that?

For example consider this answer which received 3 downvotes and makes me wonder.

6
  • 22
    In principle there is nothing wrong with that. I believe the simplest explanation of this scenario is that the downvoters disapprove your specific workaround, rather than workarounds in general.
    – duplode
    Oct 9, 2016 at 19:08
  • 9
    In general, I think it's better to solve the OP's problem than answer their question; this often requires a lot more information than they initially present (which they're often surprisingly unwilling to part with) but is ultimately more satisfying (for me, anyway).
    – jonrsharpe
    Oct 9, 2016 at 19:26
  • 5
    There's nothing wrong with workarounds. For your specific example, it was a bad workaround.
    – Hong Ooi
    Oct 9, 2016 at 22:14
  • better to solve the OP's problem than answer their question; .. but is ultimately more satisfying .. it also tends to lead to more thorough answers, which are more beneficial for the community as well, IMO.
    – Leigh
    Oct 10, 2016 at 3:43
  • If there is an actual solution to the problem answer with the solution. Keep workarounds for situations where what the OP wants cannot be done in a proper way.
    – Bakuriu
    Oct 11, 2016 at 7:06
  • 3
    For what it's worth, I have often been disappointed when I find a thread that is exactly what I want based on the title only to find that the "answer" is a workaround that doesn't solve the title and stated problem.
    – enderland
    Oct 11, 2016 at 17:58

2 Answers 2

82

From the help center (emphasis mine):

What, specifically, is the question asking for? Make sure your answer provides that – or a viable alternative.

So, yes, workarounds can make good answers. If this is also true for a specific answer, that's for the community to decide.

3
  • 1
    Well, my question can rephrased as "Are workarounds considered viable alternative?" but I got your point. +1
    – Ohad Eytan
    Oct 10, 2016 at 7:05
  • 8
    @OhadEytan a workaround is an alternative by definition. Viable depends on two things: does the workaround actually work, and does it do what the questioner requires. Oct 10, 2016 at 21:29
  • 2
    I agree with this answer. Workarounds can be invaluable. Sometimes they are the only solution and sometimes understanding how to work around a problem is more valuable than a direct solution due to its reuse value in similar but different future problems. Not to mention the "time value" concept. I'd rather have a workaround today than a direct solution tomorrow (!).
    – Hack-R
    Oct 11, 2016 at 14:15
16

That looks like a horrendously hacky work around for OP's problem. But there's a worse problem for it on SO: it is completely localized for OP's problem. The next person who comes along wondering how to deal with multi-line expressions in Python AST is going to find that answer completely useless. I would have down voted that answer if I'd seen it (but haven't because I don't think it deserves Meta-effect!).

6
  • 2
    As much as I know the main purpose of an answer should be the OP itself, the "next person" benefits are a good side effect rather than a demand.
    – Ohad Eytan
    Oct 10, 2016 at 7:13
  • 32
    @OhadEytan eh no, quite the other way around. The fact that the person asking the question is helped is a good side effect, but SO tailors to the masses and not the individual.
    – Gimby
    Oct 10, 2016 at 7:34
  • 2
    @Gimby can you give some reference for that? Maybe it worth another meta-question
    – Ohad Eytan
    Oct 10, 2016 at 21:04
  • 1
    I am concerned more about the wider audience than the localized op question. Because we are trying to pull them toward best practices. And more eyes will follow than the op eyes.
    – Drew
    Oct 11, 2016 at 4:50
  • @OhadEytan No specific reference, but it's implicit in the question close-vote reasons. This is the very reason that questions which are too broad or too specific are closed: they're unlikely to invite answers which help more people than the OP.
    – jpaugh
    Oct 11, 2016 at 14:25
  • 5
    @Gimby it's a more complicated relationship than that. I always write my answers with posterity in mind, but my motivation is usually to help a single person in the moment. Oct 11, 2016 at 14:32

You must log in to answer this question.

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