Often you have a question, you can't find the answer on Stack Overflow so you search for it (or think a bit more). Having found the answer you'd like to keep a record so you can find it again later.

Before Stack Overflow I would write a blog post so I could search for it later. Jeff and Joel, I think, specifically said SO is a good place to replace these blog posts. So what is the best etiquette for adding your answer?

  1. Just ask the question, then post your answer immediately and let voting sort the answers out. This is okay, but it looks like you are just trying to generate reputation, and other people often don't vote or answer, and a lot of the SO information is lost.

  2. Provide the answer in the question and ask the question phrased as "is there a better answer". This allows others to gain reputation, and doesn't look so greedy but makes your answer harder to vote on.

  3. Post your question, let others answer it. If no-one puts the answer you already found, then add it an hour or so later. If someone else gets it then accept their answer (or the best one). This is more selfless with reputation, but makes other people do work you have already done which feels a bit lazy and a waste of everyone's time.

Or maybe there is another way?

Return to FAQ index

  • 15
    By the way, in a nice bit of self-reference I used option 2 in this question and it seems to be working ok :-) – Nick Fortescue Jan 30 '09 at 9:33
  • 7
    Note (now nearly 2 years later) that including the answer in the question is not currently accepted as a good idea. – Gnome Nov 1 '10 at 12:50
  • 3
    it would have been more amusing if you had answered this question and marked it as the answer :D – Choco Smith Aug 4 '14 at 13:28
  • 2
    A good question followed by a good answer is useful to everyone, it doesn't matter who the author is. Any idea that this should be frowned upon is antithetical to the function of a QA site. These questions and answers don't exist for the answerers, or even the original askers (although they benefit), but for the subsequent readers. That's why questions aren't deleted when they've been answered to the asker's satisfaction. – Django Reinhardt Apr 21 '17 at 16:55
  • 1
    In case of using option 2 it could happen that someone runs into a primarely opinion based or a we are not code-review issue, since asking "is there a better answer/way" is going a bit into that direction.. – iLuvLogix Apr 9 '19 at 14:07

Just post your answer immediately after you post the question. Like you say, phrase it as a request for comments to improve your solution. Your intentions are clear --- I wouldn't think you were trying to generate reputation. Besides, it's my prerogative to reward or punish your efforts. Alternatively, you could mark your answer as a community wiki if you are feeling charitable.

You can now do this automatically by ticking the “Answer your own question” checkbox when posting the question, provided you have more than 15 reputation.

| improve this answer | |
  • 1
    For some reason, this doesn't seem to work quite right. I posted a question together with an answer which wasn't the best solution but it worked. I attracted some votes for close and lots of people rushing in to answer without even reading the question properly. Any idea how to avoid this? Here's the question, as a reference: stackoverflow.com/questions/18762588/… – Mihai Todor Sep 12 '13 at 11:59
  • @MihaiTodor That linked question had gained 7 votes and 5,965 views as of my last visit. Sounds like an 'ok' question to me. || "X... doesn't seem to work quite right" is almost always happen, IMHO, in every step of "educating" the audience to a guided system or new principle.. || I look up on your stand coz you had actually 'published' the QnA site of your own before.. I'm just as curios to see.. how the highly flexible 'freedom to answer/comment/edit' power (in SE) vs freedom to 'comment' (in blog) compares.. It's an interesting study on it's own.. – p._phidot_ May 10 '19 at 0:46
  • @p._phidot_ I don't really have an answer for that, sorry. Good luck with the study! – Mihai Todor May 10 '19 at 22:34
  • 1
    @MihaiTodor Thanks for the support.. really appreciate it.. Hope these kind of organizational behaviour study can help us leave more deeds than just 'data' when we left this world.. | Really appreciate it.. /(^_^) – p._phidot_ May 11 '19 at 20:20

The community benefits from having a growing store of useful question/answer articles on this site. This is true regardless of whether the question and answer are provided by two different people or the same person. Also, a person who writes a clear, easy to find question and then an easy to follow answer has done some unpaid work to help other people, so they deserve reputation points as much as anyone does.

This is presumably why the FAQ says:

It's also perfectly fine to ask and answer your own programming question

The aim of the site is gather lots of useful questions and answers. It does this by rewarding those who take the time to contribute with a simple points system with a scoreboard, the points being rewarded by the other users.

If the users habitually award points based on anything apart from the usefulness of the questions and answers, the site will end up as a respository of... what? Depends what weird criteria people are using to award points.

It can be difficult to keep that in mind, as we are not totally rational animals, and all incentive systems produce a certain amount of irrational complaint as a by-product, but it's worth a try.

Maybe one day, when SO has taken over the world, and is the Walmart of programming tips, someone will start a 100% "organic" programming Q&A site, where all the questions and answers are certified to be based on genuine incidents involving exactly one programmer lost in a puzzle they can't answer and one or more enlightened heroes who come to their rescue. And maybe it will feel better that way!

| improve this answer | |
  • +1 for the "as we are not totally rational animals" and your interesting conclusion! (I'd have use "really" instead of "totally" though) – JinSnow Feb 16 '17 at 8:41

I got marked down and slated for answering my own question.... If you look at the badges there is one awarded for answering your own question and getting > 4 votes. This means this is surely approved, and what's more the only method where you will get a badge for it!

| improve this answer | |
  • What? I don't see that badge. – Alba Mendez May 14 '12 at 10:26
  • 2
    @jmendeth Self Learner – Ben Brocka Jun 22 '12 at 21:14
  • 7
    Yes, I too ruffled some feathers after posting this Q and A. First and foremost, I think of SO as a vast knowledge base for programmers. I value SO for the answers it yields far more than the reputation I have earned. But my sense is that many feel that the primary purpose of SO (and the other StackExchange sites) is that as a forum for competition. – DavidRR Dec 20 '13 at 14:46

I think #2 is a strong answer, respectful of the SO community.

Asking a question you know the answer to (especially if you answer int he same breath) is of dubious value and intent, but if you approach this with the mindset that what you think you "know" might not really be the best answer, I think you'll be illuminated most of the time.

Nine times out of ten when I go to answer a post, I'm still going to see something which augments, challenges (and therefore causes me to research and reinforce or change my opinion), or completely surprises me. You don't knwo what you don't know after all, and us programmers do tend to lack a certain humility. :P

| improve this answer | |
  • +1 So true - I never cease to learn by answering questions. – Basic Jan 3 '12 at 1:54
  • 11
    #2 is a bad idea. What if the asker's answer is a good answer? Then we end up with an answer in the question, and no answer as an answer. It completely abuses the format of Stack Exchange. – Gilles 'SO- stop being evil' Jun 23 '12 at 23:42

According to this link on Stack Overflow, it would follow that #1 would be the right etiquette.


As mentioned above by @Zach Scrivena, there is even functionality to submit the answer at the same time.

To address the etiquette (as in the title of the question), given that answering your own question is "explicity encouraged" by Stack Exchange...

Yes! Stack Exchange has always explicitly encouraged users to answer their own questions. If you have a question that you already know the answer to, and you would like to document that knowledge in public so that others (including yourself) can find it later, it's perfectly okay to ask and answer your own question on a Stack Exchange site.

...the question of etiquette might be redirected to the users reading the self-answered question. If you are down-voted, slated or given abuse by users BECAUSE you answered your own question, I believe you should have the right to report that user or flag the behaviour (not sure of the protocol/lingo as I have never reported anyone).

  • 5
    Better get rid or edit the last paragraph, calling users who downvote trolls won't do anyone any good. (And likely the reason for the downvote(s) here.) – Shadow Wizard Wearing Mask Mar 28 '19 at 14:13
  • 1
    Wow. I guess the people who are downvoting are the exact people I was talking about. Will remove troll and change to something that will hopefully appease the masses – Jarrod McGuire Apr 9 '19 at 14:00

It appears this is being abused by those with high reputation asking a question and then posing an incredibly detailed answer, or those with sockpuppets. This discourages competing answers that may be more correct and serves to pad rep for high rep OPs, in conjunction to the manipulation they are already doing via sockpuppets.

I'm of the mind that those asking and answering their own questions should receive no rep padding for this, and there should be quality control on sockpuppet usage.

It fundamentally changes the nature of the associated sites from a Q&A, to something that others may view more negatively...

Yes, I can pull up a large number of examples of high rep OPs using instant answers, or self-answering...

Is it possible to hide a malicious alias in Bash on Linux?

Office 2010 silent activation after unattended installation

I know saying this isn't popular, but it needs to be said. Many of the same OPs that have conducted these type of actions, are the sames that are now down voting this.

Many of us know about the behavior where a high rep OP follows his or her own posting and immediately sockpuppets it with a +1 or more.

These types of rep manipulations are unwarranted and do not actually show a community interest, nor do they foster a conversation or dialogue.

  • 3
    Got any examples? – Adam Lear Jun 22 '12 at 16:20
  • 1
  • 19
    We want incredibly detailed answers. At the end of the day we're a site for sharing information, supported by a game system. We're not a game supported by sharing information. Info takes precedence. – Ben Brocka Jun 22 '12 at 21:34
  • 1
    @BenBrocka even if it leads to exploitation of the reputation based system? – Brennan Jun 23 '12 at 2:26
  • @Brennan There are fraud detection mechanism that will revert your vote when it detects suspicious voting activity. For this reason "sockpuppet" account are in my opinion are very minor problem since you can't do much with them or else you get discovered and lose all the reputation you gained from it. – HoLyVieR Jun 23 '12 at 3:02
  • 20
    Posting good answers to get rep is not exploitation of the reputation system; it is the reputation system "exploiting" users. – Ben Brocka Jun 23 '12 at 3:10
  • @BenBrocka the topic is not posting good answers, it is posting instant-answers, answering own questions, and sockpuppet rep-whoring. – Brennan Jun 23 '12 at 15:53
  • You're completely misrepresenting the topic, so it's no surprise we're talking about different things. And, honestly? Sockpuppets? That's a complete non-sequitur. – Ben Brocka Jun 23 '12 at 15:58
  • @BenBrocka OPs are now answering own questions, then coming behind with a sockpuppet to give themselves rep. The original topic includes the rep whoring issue, and I am staying on it. Thanks – Brennan Jun 23 '12 at 19:16
  • 5
    What are you smoking? I don't see any abuse in the two examples you posted. The one of the two that I can judge is a good question with a good answer. You are accusing two users of having sockpuppets: do you have proof or at least a reasonable suspicion behind this accusation? – Gilles 'SO- stop being evil' Jun 23 '12 at 21:55
  • 3
    By the way, self-answers are not a new thing. They have been officially blessed on Stack Overflow since day 1. There is no “rep padding”, those votes come from other users like for any other post. – Gilles 'SO- stop being evil' Jun 23 '12 at 21:57
  • Oh, and I should mention that I'm one of these evil people who have self-answered a few times. I know for a fact that I have no sockpuppets. – Gilles 'SO- stop being evil' Jun 23 '12 at 21:58
  • @Brennan, when you ask "even if it leads to exploitation of the reputation based system?", please remember the reputation system serves the site, and the getting answers about programming questions goal. Even if this behavior could have negative effects on your vision of the reputation system, the first goal is met: if someone has the same question and does a search on Google, it will find it, already answered. – Dereckson Feb 9 '14 at 7:47
  • I think answer is correct. Stackoverflow has grown to be a) place to share information b) nerd battleground. This answer reflects to the latter. Ben Brocka types that system is "exploiting" users which is correct at a) but NOT at b) because at b) users dont care the system, they care their own life, respect and career based on their skills - which they may build by making own questions and answers. I think the ratio of answer types could be open information, your status could tell how much you have answered to your own questions. This is information as well. – Nerdman Feb 11 '14 at 8:05

You must log in to answer this question.

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