Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

So I googled the question "how do I find the hostname in javascript" and found my answer on the expert's exchange site. So I thought, I don't want to have to go to that site next time I google for the same question so I went over to SO and asked the question and answered it myself.

However, now I'm getting a bunch of downvotes and abuse for doing this. I've listened to every SO podcast and this is acceptable behavior by Joel -- and I think Jeff too, although he wasn't as enthusiastic about it.

I'm pretty sure that Joel and Jeff would want the traffic from a question like this but if this is not acceptable behavior I'll be glad to delete the question. I see it is a duplicate question now but the difference of hostname versus domain is enough IMHO to keep it around.

share|improve this question
Thanks to all the answers -- I understand the problems now. – sheats Nov 19 '09 at 23:01

They didn't downvote you because it's a poor question (although it is poorly written), they downvoted you because:

  • You asked a duplicate Question
  • You didn't check to see if it had already been asked

Posting a question and then answering it is perfectly acceptable. To do so, you need to follow some guidelines:

  • Make sure it isn't a duplicate
  • Treat it like Jeopardy. Don't provide the answer in the question.
  • Properly format the question. Make it look good.
share|improve this answer

It looks to me some/most of the down votes, all two of them, are because it is a duplicate question. While answering your question is not a problem (and good of you to come here), not checking to see if we already had it on SO is 'discouraged'.

share|improve this answer

In addition to not adding dupes (which is probably the cause of most of the downvote hate), when self-answering, many people will advocate marking the answer as "community wiki." This way it doesn't look like you're just looking for rep. It also allows others (with significantly less rep than the 2,000 required to edit normally) to contribute to the answer. Keep the question non-wiki, but the answer wiki. This isn't required, and generally (to me) shouldn't be necessary, but it seems to be a common guideline these days.

Honestly, back in the early days of SO, I did exactly what you did, and didn't have issues. But my question wasn't a dupe. (It also didn't get a lot of rep, but it scored some from both the question and answer side.)

share|improve this answer

I think if you are going to post the answer to a legitimate question right away -- and I'm ok with that -- I'd make a note that you'll be supplying your answer separately. And also acknowledge that you're open to other solutions. Hard to see how this would apply to the example question though. More complex questions that you've already got a solution for are probably better suited to this. when you ask a simple question and immediately post an answer it looks too much like a vote grab and not simply knowledge sharing or a quest for a better, alternative solution

share|improve this answer

I see two "problems" here.

The first was the speed with which you posted your answer. When the issue of posting questions to which you already know the answer has been raised before the general consensus was that it's OK as long as you leave a day or two between posting the question and answer. That way it's not so obvious that you know the answer already.

The second was the fact that the question was a duplicate. Now these aren't normally down-voted, but the first problem didn't help here.

share|improve this answer

You must log in to answer this question.

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