4

When asking a question, how necessary is it to provide an attempt? Usually when I have a question for SO, I know right away that any solution I provide is going to be heavy-handed. For example, in this recent question, I didn't provide a solution attempt because I knew there'd be a one-liner out there and all of my ideas were pretty bad. Turns out Dan D. provided this:

l.sort(key=lambda v: (len(v.split('.')), v.split('.')))

I would have never arrived at this solution, and that's exactly what prompted me to ask the question.

In the future, is it better to provide an attempted solution even if the solution is poor? A lot of the time, I provided attempts seem interpreted as acts of good will.

Thanks

8
  • 4
    No, but typically "do my work for me" questions attract downvotes and close votes (unclear what you're asking--you didn't say how what you tried failed).
    – user1228
    Commented Jan 26, 2015 at 19:40
  • Unclear questions are one thing (that I probably ask too often), but people jump on questions that have a succinct, "do this for me" answer. Any question I've ever asked that could be solved with a one-line, clever solution inevitably gets way more attention than questions about making binaries or why a GUI is exhibiting strange behavior. Commented Jan 26, 2015 at 19:47
  • I guess maybe the best approach is to outline a solution mentality at least to separate oneself from people who are bringing their homework to SO. Commented Jan 26, 2015 at 19:48
  • 1
    No. Here's an example of a conceptual answer I wrote for homework help from a while ago: stackoverflow.com/a/20056528/295808 Also note in the comments that I provided a tutorial to get the question asker in the right direction. We do a disservice to learning coders if we provide them "magic code" that they don't understand. Homework questions are fine, so long as they're not expecting us to do their work for them, and they're willing to put in time to actually learn what we're telling them.
    – Compass
    Commented Jan 26, 2015 at 19:49
  • top answer over there explains quite clearly why attempt at solution is not a mandatory prerequisite
    – gnat
    Commented Jan 26, 2015 at 20:27
  • Years ago I read how-to-ask after being asked to. Following how to ask usually finds me the answer either on the site or when creating a simple example to demonstrate to problem I find my mistake. I enjoy participating in the forums but have infrequent reasons to anymore.
    – Mark
    Commented Jan 26, 2015 at 20:34
  • 1
    To clarify: while your requirements may be clear, dropping your requirements on us is not a question. That's a statement of the goals you wish to accomplish. Great! Awesome. Now what's the problem? As there is no information about what the asker has done, and what went wrong, it is not possible to answer the question. The question can be closed as unclear. If the question is "oh, you see, I have no idea how to do this," then the answer is always the same here--hire a developer. Closing it as unclear is more polite than telling the OP they're lazy and unqualified.
    – user1228
    Commented Jan 26, 2015 at 21:26
  • I can see where you're coming from, and you obviously have a lot more experience on the site than me, so I'm not trying to argue. I merely observed that a lot of questions that fall into this category turn out to be hugely popular. For example: stackoverflow.com/questions/82831/… That's a "do my work for me, I haven't provided a solution attempt" kind of problem if I ever have seen it and it's a top-five problem. I guess being older, the early questions probably didn't have the same constraints as we do now. Commented Jan 26, 2015 at 22:10

2 Answers 2

5

No, questions do not need an attempted solution in order to be clear or answerable.

Yes, sometimes people use "unclear what you're asking" for "Give me teh codez" questions, even if it is very clear what the OP is asking for.

It is important to let us know what you've tried in the case where you're asking us to debug your code; that way we don't go down a path you already went down.

It is also likely you'll attract downvotes if you don't at least attempt something on your own (mostly because people feel like you're taking advantage of SO if you don't try something on your own).

In your case, your question is clear (now) and not an attempt to debug an issue. While it is nice (and upvote-worthy) if you let us know what you've tried, it is not a requirement.

It is important to note your question was closed within five minutes of being posted; you edited it and then it was re-opened.

It was closed for the following reasons:

  • Your sort hierarchy wasn't clear (as laid out in the comments)
  • Spelling and grammar made it look more like you didn't care enough to put effort into making it a good question

I voted to re-open it; in its current form it is clear (although it can use some spelling and grammar love).

Edit: I've made the necessary edits to clean up the question.

1
  • Thanks. Yes, it was a poorly-posed question and deserved to be closed as stated. It got me thinking about this topic when I went to add in the edits, and one of the commentors asked for a solution attempt. Commented Jan 26, 2015 at 20:04
5

It makes sense that you'd want to avoid posting an impractically long-winded failed solution as a part of your question. But that said, you do want to make sure you at least describe in general what you tried, so that people can understand what your problem really is. One upside of this is that many times, what you've tried is a step in the right direction, and can be used to get you where you need to be. Additionally, as mentioned by Will in the comments, even if you were on 100% the wrong track and what you've attempted so far is totally useless, it still confirms to potential answerers that you're interested in solving your own problem and you didn't just roll up here expecting someone to do your work for you.

So overall - there's not a hard and fast standard for completeness that your attempts so far are going to be measured against, but you want to use your judgement to document your efforts in an appropriate and reasonable way.

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