23

I have thought about posting a self answered question. I have read, that the question must have the same quality as any other question - including the "What have you tried" part. But at the same time it should not contain the entire answer. But if I include everything I tried - the answer would be already in the question.

So I asked myself how much should be included. Only the documentation part (what documentation have I read and my conclusions following this)? Part of the code that lead to the solution (but then the solution is propably obvious)?

I have read the answer of this question, but it only tells me, that it is hard to write a good question I already know the answer.

So my question is: are there any guidelines how much of the process that lead to my solution should be contained in the question?

5
  • 4
    Hypothetical questions like this are going to get hypothetical answers that may, or more usually, may not be useful. Can you show the question you would want to ask?
    – CodeCaster
    Nov 6, 2015 at 11:34
  • Should this be added at the bottom of this question? I will need some time to formulate my question though.
    – Rhayene
    Nov 6, 2015 at 11:42
  • 1
    Yes, it'd be useful if you could edit it into your question here. I'm general though, the question should be answerable by someone else.
    – CodeCaster
    Nov 6, 2015 at 11:49
  • 4
    @CodeCaster with a caveat, though - I think we give leeway for reference questions (which tend to be self-answered, although not all self-answered questions are reference questions nor vica versa) to be broader than we'd normally tolerate. Given an error message that can be produced in 10 common ways, a question asking "how do I fix [error message]" without enough context to identify the cause would normally be off-topic, but a reference question whose answer is a guide to debugging the error and lists all 10 of the common ways is acceptable.
    – Mark Amery
    Nov 7, 2015 at 13:14
  • 1
    If by including everything you tried, the answer will be in the question, then something IS wrong.
    – user5306470
    Nov 8, 2015 at 19:17

3 Answers 3

24

What have you tried?

Where to start with this one. This phrase, while being extremely important to the well being of the site, can be a curse. In fact, it is so much of a curse that that phrase is no longer permitted in comments on questions on the main site because it was overused to the point that it just became noise.

Yes, a good question is a well researched question, but a good question does not often contain a blow-by-blow description of everything that the author did before asking the question. All we really want to see is a well asked question that appears as if the author put forth some effort before posting.

Just because you don't have a documented attempt of what you tried does not make the question off-topic. To quote Shog9:

In particular, questions that do not include an attempted solution are usually too broad.

This is entirely incorrect.

It's true that questions on solving large problems where the asker hasn't tried anything yet are often too broad - there's simply too much ground to cover for a single question.

But many specific, answerable questions don't include attempted solutions because... There's nothing to attempt: either you know the answer or you don't. Indeed, this can be a hallmark of a properly-scoped question: have you managed to narrow it down to the one piece you don't know before asking?

If the asker identifies where they want to start, and where they want to end, but there are way too many pieces to fill in, then it is Too Broad


So to address your specific question. Your research is correct. A self-answered question is not exempt from the question asking guidelines. Ask the question you want to ask. Make it clear. Make sure all of the relevant information is included in the question (this includes any failed attempts as the failure and how the result did not match what was expected is usually very relevant). Make sure someone else can provide an answer to the question without needing read your mind or rely on the self-answer to get an idea of what you wanted.

Don't just write a very short, quick, broad question so you can post your answer. Write the exact question you are trying to answer. Make sure it is clear and to the point. Include all important information, like example code, relevant failed attempts, error messages, input values, expected output. And make sure it is clear what you are asking. Think about it this way, after writing the question, ask yourself: "If I wasn't myself, would I still be able to answer this question exactly the same way?"

If you follow these suggestions, it shouldn't matter you didn't write a novel explaining everything you tried.

1
  • @pnuts I think there is are 2 different responses to that. First, I would assume what didn't work (especially if it would appear to be an obvious answer) to be part of the "relevant information". And swecond, if it isn't there, then it shouldn't matter that it didn't work for the OP. If the answer works for someone, then it is a good and useful answer. Nov 8, 2015 at 21:30
6

Yes, writing a good question is hard.

For a self-answered question, your best bet is to show an example of something reasonable that someone might try if they didn't already know the answer. If your problem generates a specific error from the compiler/interpreter, the inclusion of that error will likely be the best way to help future users find your question/answer.

I'm trying to Foo the Bar. The usual way to do that is like this [insert code here]. That doesn't work for me because I am also doing Y and I get this error [insert error message here].

Goofus

https://stackoverflow.com/questions/11193029/sass-each-loops-in-scss (deleted, 10k+ rep)

I had a lot of repeating code in my css and was looking for a better way to organize it. Where to start? I installed Sass and setup my scss file. I had some button classes like blue, green, red using image sprite. Basically all the code was the same but color and positions.

The question is all kinds of unclear. The author's primary concern here is that they're repeating a lot of code. When you search for "sass repeating", there are a lot of results showing all sorts of things they could try to avoid repetition, but the OP doesn't appear to have tried any of them.

What's worse is that the OP didn't even provide anything as a starting point. The OP may have had the most efficient way to write their code, but we'll never know that until they leave a comment on the "obvious" answer that will end up getting posted saying "I already tried that".

The provided answer is a "Tada! Here's you're fully fleshed out solution!"

Gallant

Modifying the middle of a selector in Sass (adding/removing classes, etc.)

I have the following SCSS for styling links in my menu:

[...]

Which generates the following (correct) CSS:

[...]

I could rewrite my JavaScript to append the class to the nav element instead, and use selector-append() in Sass to append the class. But that seems to do the appending in the wrong order (and if the arguments are reversed, the class is appended to the last element!):

[...]

Output (incorrect!):

[...]

Is there a way the SCSS can be rewritten so that the class can be correctly appended without having to duplicate selectors (similar to the selector-append() method)?

This is a self-answered question I wrote to use as a dupe target for similarly asked questions. I started writing the answer in response to a question written by someone else, but the OP got angry and deleted their question. It seemed like a waste to just throw it away. The phrasing isn't great here (I spent more time proof-reading the answer), but it shows a clear problem along with an example of something that anyone who has done any research at all might have tried (along with information about errors).

0

I believe the "how much you tried" is some kind of justification for posting a low quality question or a question perceived as a low quality one. From a certain point of view, it is just clutter. From another point of view, it is some kind of helpful hint to the answerers (look: I have already tried this or that, but it did not work out).

I suggest you to post the unaltered question without any of that. When you reply, you may include in your answer an appendix explaining why other solutions will not work.

(so: not at the bottom of the question, but rather at the bottom of the answer)

1
  • 5
    Even a self-answered question should be answerable by others (and often is answered by others, sometimes very successfully). So a restriction along the lines of "I have already tried this or that, but it did not work" absolutely belongs in the question, not as some sort of appendix to one of the answers.
    – ruakh
    Nov 9, 2015 at 8:45

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