8

I came across a question lately which doesn't seem to have a proper technical solution. Meaning, any answer that i may supply would be defined as a "work-around", and wouldn't have a technical answer that I myself (maybe others would) be happy with.

This isn't the first time I come across questions like these, and always feel like my supplied answer wouldn't be good enough, as I always feel that when giving an answer, it must have some proper technical solution which I (and others) would agree is a good way to approach the problem.

Usually, i also see that these type of answers don't get "much love" as they really, almost always "state the obvious". I find myself most of the times stating that "impossibility" of the solution in a comment, and rarely give an answer.

So, I'm wondering, what do you do in these type of situations? Do you think answering them is the proper thing to do? Or perhaps a comment is enough?

Edit: This isn't about how to solve XY problems. It's about questions that aren't a clear cut as an XY problem ,but more of questions where the OP is usually forced to do something a certain way, and there is no "proper" solution to that problem.

7
  • Are you actually asking how to solve XY problem questions? Commented Apr 18, 2015 at 13:47
  • 1
    I don't think so. I'm asking about questions where the OP is forced do so something a certain way and he can't overcome it due to external reasons. Such as when using an external 3rd party API. Commented Apr 18, 2015 at 13:49
  • It's pretty obvious with XY problems, and you can usually spot them right away. Though the question i referenced isn't a classic XY problem, I guess. Commented Apr 18, 2015 at 13:51
  • Yeah, I've been looking at the question now. But still the OP's asking for something that's essentially not possible, unless they're changing their design. So, that's what I meant with XY-problem here. Commented Apr 18, 2015 at 13:52
  • It is a "real world" problem. He did not solve it correctly, sooner or later he'll find out. There is a proper technical solution, always the same one: run it in another process that you can afford to kill. Commented Apr 18, 2015 at 16:00
  • @Hans What if there wasn't a "proper" solution to the problem, something you thought was a "hack". Would you still answer? Commented Apr 18, 2015 at 16:07
  • 1
    Sure, sometimes you need a good hack. Using another process is a hack. A proper hack. Proving that a hack is required, that's work and not always appreciated. Commented Apr 18, 2015 at 16:16

2 Answers 2

13

Your answer doesn't always have to be "proper" or "good." It just has to solve the problem.

Software development (and life) is full of compromises. Embrace the ambiguity.

An ideal answer provides the solution that solves the problem, and then explains why it might not be ideal.

4
  • You're right. But, for example, i would never suggest a solution where Thread.Abort is the only possible workaround, which is what the guy ended up doing. Dunno, maybe I'm just nitpicking.. Commented Apr 18, 2015 at 15:24
  • If it's the only possible workaround, then it's the only possible workaround.
    – Robert Harvey Mod
    Commented Apr 18, 2015 at 15:25
  • 4
    "The square wheels that you must use will run marginally better when you file off the corners. A better approach is to use round wheels."
    – Jongware
    Commented Apr 18, 2015 at 21:37
  • @Jongware Thx! That was a great read. Commented Apr 18, 2015 at 22:12
1

(I don't see the problem here, other than that the SO audience turns up its nose at such questions, which is a cultural attitude. Lots of real-world problems have no elegant solution. And lots of languages and packages we use have warts and ugly issues.)

Do write an answer rather than a comment. Just state there is no proper answer, write your best solution, then explain what's undesirable, ugly or non-general about it, what's undesirable about any alternatives, then leave it at that. Don't expect rave upvotes.

Such an answer still has great value.

Sometimes we get paralyzed by analysis-paralysis, or the hunt for an elegant or generalized solution, where none exists. It's important to remind ourselves regularly that Getting It Done, holding your nose and committing ugly, klugey, piecewise code is an important discipline. Just because you don't find that written in textbooks or hear it taught in courses, doesn't make it any less true.

You must log in to answer this question.

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