I am not a big Stack Overflow user these days, but I had an issue today that I couldn't find an answer to (on Stack Overflow or elsewhere online) -- long story short is I spent some time solving it myself and released the solution on GitHub. I decided to post a few questions on Stack Overflow so people searching for the same thing in the future find the answer.

Immediately after posting I'm getting downvoted and flamed. The question was locked and is now apparently deleted. Apparently the issue is because I posted a link to GitHub and was voted as "not a real question".

Is this bad behavior or not?

I took a couple of screenshots since the page is now deleted, looking for advice on future posts.



  • 12
    Generally I agree that it's unfortunate how the community reacts (especially given that it is explicitly encouraged). In this case, I think the issue was with the question, not with the answer- in the absence of your answer, it would be difficult to answer that question without more details, and perhaps an example. Mar 20, 2013 at 4:19
  • 1
    @DavidRobinson - I actually disagree with you that the question needs more details. You may need to know a bit more about PHP and its GD library to appreciate this but anyone asking or answering the question would have met this bar. Mar 20, 2013 at 4:22
  • 1
    For reference, here's the link to the question (10k): stackoverflow.com/questions/15514985/…
    – Mysticial
    Mar 20, 2013 at 4:39
  • 2
    @AndrewG.Johnson A question should be able to stand on its own merits. What you should have done is included your failed attempts and preliminary research effort in the question. I'm sure you've seen this comment on a low quality question at some point: "Show us what you've tried"
    – user200500
    Mar 20, 2013 at 4:50
  • 1
    @Asad - there's literally nothing to say in response to "what have you done" other than 1) Google with no results or 2) the Github code I posted in my answer. I would challenge you to rewrite my question in a manner you feel would meet the quality bar. Mar 20, 2013 at 5:01
  • 2
    @AndrewG.Johnson That isn't how this works. I wasn't the one facing the problem, so I don't have any research I can share. Google with no results is actually a fairly decent indication of research effort. The point is to demonstrate this is actually a non trivial problem, one that other people may find themselves stumped by in the future. If you managed to find the answer on your very first Google search, then it is questionable whether this is a problem that needs to be addressed on SO at all.
    – user200500
    Mar 20, 2013 at 5:09
  • 1
    @Asad - So had I added another line saying "I couldn't find anything in Google" you would have been happier with the post? Mar 20, 2013 at 5:18
  • 2
    @AndrewG.Johnson No, the string "I couldn't find anything in Google", appended to your post, would not improve it. I would have been happier with the post if it had mentioned that looking through the docs did not yield any results, listed what google searches you had tried, and/or included the code underlying "Currently I am using the imagettftext function". For example, here is a well asked question on a similar theme (the answer, by the way, also solves your problem).
    – user200500
    Mar 20, 2013 at 5:25
  • 3
    I don't think anyone intended to "flame" you. My comments were intended to be helpful: "These are extremely contrived questions, begging to be flagged as spam. You really should have at least kept this to a single question, especially since you've largely copy-pasted the same answer for both."
    – user229044
    Mar 20, 2013 at 5:38
  • If you came to Meta for sympathy, you came to the wrong place. Chalk it up to a learning experience, and move on. No sense arguing with people here since they are going to have a different opinion than you, despite your good intentions. Mar 20, 2013 at 13:56
  • 1
    I have undeleted this question: stackoverflow.com/questions/15514985 so you may handle it as you wish. If you edit it, feel free to flag or @ping me here to look at it. Mar 20, 2013 at 16:21

8 Answers 8


There is absolutely nothing at all wrong with answering your own question - even immediately. There is even an interface for that.

However, your question was not a very good question, for reasons already noted; It did not include enough information that would have allowed anyone else to answer it (which is an indicator of it not being a very good question), but it also seemed to be a fairly open-ended question.

But that's not all; you posted two very similar questions in a short period of time, to which you posted the same answer - which included a link to your project. In fact, at least one of your posts was flagged as spam due to that.

The appearance is that you simply posted those questions to have an 'excuse' to link to your Github page.

If you have a detailed, real-world question that describes a specific problem you've had - and not just answers some broad, general question, you are welcome to post it. You are also welcome to answer it, provided you adhere to all the quality guidelines - and I recommend taking a look at the FAQ on Self-Promotion, as well.

Note that I did not delete your posts as if they were spam, and you are welcome to edit them and flag them for reopening once you have a good, quality question. I recommend only doing one of them, not both.

  • 2
    This doesn't make sense. I Googled "how to blur text in php gd" and didn't get an answer. Your suggestion is to post why I needed the text blurred in the first place? Mar 20, 2013 at 5:05
  • 4
    @AndrewG.Johnson No, that's not my suggestion at all. It may, in fact, be that your question can't be posed as anything other than a broad tutorial. If that is the case, your question is one of a type we typically close - and it being self-answered has nothing to do with that. Mar 20, 2013 at 5:07
  • 4
    That's insane. Thank you. Mar 20, 2013 at 5:19
  • 3
    +1 because most of this answer I agree with, but I disagree that the question could not be answered in its current form. As someone who's used the GD library, I find this to be a clear question with a definite answer. I still think it was a poor question though because it showed no research effort or attempts.
    – Ben Lee
    Mar 20, 2013 at 6:59
  • @BenLee That statement is definitely the weakest part of my argument, for sure. Mar 20, 2013 at 7:04
  • 3
    @Andrew G. Johnson: Just remember that Stack Overflow is a place for answering specific programming questions, not posting tutorials. You can answer your own question immediately, but you need to have a reasonably-scoped question to answer - and that is one that is subject to the same criteria for voting and closure as any other question. Mar 20, 2013 at 7:13
  • 3
    I disagree with closing this question, but it's a debatable case. On the other hand, you should not have deleted this question. Please read meta.stackexchange.com/questions/171763/… . Do not delete questions without waiting at least 48 hours, unless the question is unsalvageable (which this one was definitely not). Mar 20, 2013 at 13:15
  • @Gilles I explained this was a special case; they had spam flags. Andrew himself has also said he can't fix the posts. But I have also told him I will restore it if he edits it into shape. I am not leaving the post(s) in Limbo. Mar 20, 2013 at 13:19
  • 3
    @AndrewBarber As a moderator, you are supposed to apply your own judgement to flags. This was clearly not spam, so decline the flags and move on. You put the post into a stae where Andrew cannot even access it, let alone edit it! Mar 20, 2013 at 13:24
  • @Gilles I did decline the flags. And I applied my judgement. My answer contains my justification. You clearly disagree, which is fine, of course. Mar 20, 2013 at 13:26
  • 2
    Oh, a reminder, which you really need to keep in mind whenever you consider whether deleting a question: if a user has less than 10k rep, they cannot view any deleted question, even their own. Mar 20, 2013 at 13:27
  • 2
    @Gilles I never take a user's reputation into account to decide whether to delete something, actually. Nor should I, IMO. That said, you are right to point out that does make it harder to fix things. I would edit that fix in myself though, if need be. Mar 20, 2013 at 13:32
  • 3
    @AndrewBarber It doesn't make it hard: it makes it impossible. You are telling Andrew that he is “welcome to [do something impossible] and flag them for reopening”. I agree with not taking the reputation into account — the solution is to not delete without waiting regardless of the asker's reputation. Mar 20, 2013 at 13:37
  • I understand where you are coming from, and appreciate the input, @Gilles. I'll keep those things in mind. Mar 20, 2013 at 13:40

To answer the question in the title: no, self-answering is not frowned upon. It's perfectly valid to answer your own question, it's even encouraged. Posting an answer to your own question is not the problem here.

There's a checkbox on the "ask question" page that lets you post an answer at the same time as posting the question, immediately. Your situations is one of those situations that little checkbox is designed for - when you're posting a known solution to a problem in a Q&A style. Posting the answer straight away is not your problem, either1.

Rather, I think there's a few possible issues with your post that may have provoked the reaction you observed.

  1. The question looks like it is asking for the complete solution to the problem without showing any effort to solve the problem yourself. If readers look no further and miss that you've answered the question yourself, they may come to the conclusion that it's just a "pleez send teh codez" question and react accordingly.

  2. The post may have also been interpreted as nothing more that an attempt to advertise your project, and been treated as if it were spam.

  3. The problem you're addressing might be considered too localised.

If doing something similar in the future, you'll need to spend more time fleshing out the question to demonstrate the exact nature of the problem, and why the "obvious solutions" (if any) are insufficient to solve the issue.

It's probably also worth considering if it's really necessary to post the question in the first place. If all you're doing is posting a question so that you can share the answer, then you should probably reconsider.

1Although, in the general case it's not always the best course, as it might discourage answers from other users. That doesn't seem to apply here though.

  • 1
    Same challenge I have posted to others here: show me a better way to answer the question and I will acknowledge you have a point. I sincerely do not believe there is a better way to ask. There is nothing I tried that came close to moving me toward a solution sort of the final solution I put on Github. I could have added a sentence saying "I spent a long time Googling this and found nothing" but that seemed like a net negative. Mar 20, 2013 at 4:57
  • 2
    @Andrew: I'm not familiar with PHP or GD, so I couldn't rewrite your question any better myself, but some possible ways you could have improved it: 1) it could have been more specific (which do you want, glow or shadow? There's a difference). 2) You could have shared what you had so far, the code you were using to draw the current text. 3) You could have indicated that you had spent time Googling and checking the documentation, citing exactly what you found and why it didn't help. 4) You could have provided a mockup of the effect you were after.
    – Mac
    Mar 20, 2013 at 5:08
  • 1
    @AndrewG.Johnson. Regarding "show me a better way" -- that's difficult since you did the research, not us. Tell me, where and how did finially find the answer? And where did you look or what did you try prior to finding the answer? Tell me these things, and I can probably tell you a better way.
    – Ben Lee
    Mar 20, 2013 at 7:03

It is fine to answer your own question. We simply want it to be a good question with a good answer that will help other people. When we see a one line question with a one line answer or where the bulk of the useful content is behind a link offsite, it tends to lead people to think both the question and answer are of poor quality.

Think about it. If you provide a question in the form of "How can I do xyz with abc?," you would rightfully expect people to ask "what have you tried?" People could downvote your question.

If you answer somebody else's question with "use this function," and it links somewhere else, people would similarly downvote it, ask you to provide the code in the actual answer (because links can die), flag your content as "not an answer," or all of the above.

You have combined these "sins" into one. And we haven't even gotten to the point of whether or not anyone else would find either your question or answer helpful. A question that you have that is only relevant to you is not going to be helpful to the internet at large. (Since I am not a PHP developer, I will offer no opinion on whether your specific question is helpful.)

So yes, answer your own question. But we still expect both your question and your answer to rise to the same level of quality we expect of all questions and all answers.

  • You're speaking in vague terms. If you can provide an example of a "have you tried X?" then I think your point makes sense. I believe that's an impossible task so the point is moot. Mar 20, 2013 at 4:58
  • 5
    How is it impossible? You tried something. You wrote a function to solve your own problem. Did you encounter problems writing that function? Smaller problems to solve? Maybe you got most of the way there, and needed something to get you over that final hill. Show what you tried in the question. And when you answer show how you solved that last problem. Come on, now, you know you could have made your question something good and your answer something better. Mar 20, 2013 at 5:16

Some people don't like it. Ignore them. If they complain, point them to the FAQ: “It’s also OK to ask and answer your own question.” Don't hesitate to flag if they're rude.

If you post a question together with its answers, do make sure that your question makes sense on its own. Other people might answer it too, and having more context helps others find your question and decide whether it applies to their problem. Your question was very terse, a bit of context and motivation would have helped.

I'm sorry your question was deleted. This should not have happened and hopefully will be rectified soon. Premature deletion is a recognized problem that we (the SO community, and also the Stack Exchange community managers) are working on fixing.

  • I have undeleted one of the questions in question. (Link in comment to this question.) Mar 20, 2013 at 16:22
  • 1
    The problem isn't that the question was self answered, the problem is that the question sucked. There is actually already a question on main that solves the exact same problem with the exact same approach, which the OP did not see or ignored. That said, there are many cases where users downvote just because a question is self answered, and in those cases your advice is sound. To my knowledge though, most thorough self answered questions have a great number of upvotes.
    – user200500
    Mar 21, 2013 at 3:32

It's perfectly fine to answer a self question, but when I saw your question my fingers just wanted to write:

Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself. It saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer! (source)

I mean, the question should be good and provide reasonable information, so that other users can answer too regardles of the self answer.

What I (maybe the community too) feel when I see your question (I am not either concern answer or taking):

Is it possible to add glow or a shadow to text in GD?

Please do some effort. Spend some time in research (google) to show effort.

@replay to your comment

The imagettftext function is somewhat poorly named and could be called add_text_to_existing_image.

Well, it is not a reason at all to change the name of the function since it is poorly named. I think imagettftext ( image(i) TrueType(tt) fonts(f) text ) is fine already

  • I think your assumption comes from a place of being unfamiliar with PHP and its GD library. Not meant as an insult, 99% of people on SO would fit that description. However anyone asking or answering the question would know there's really no extra details to give. The imagettftext function is kind of poorly named and could be called add_text_to_existing_image -- with that kind of function there's really no way to add glow or drop shadow logically. I don't know what else could have been added to the question. Mar 20, 2013 at 4:24
  • In response to your edit: I don't actually think the naming is bad I just assumed you'd need some context around the question. In the google result I see a lot of people asking the same question. Some include large code snippets that are largely irrelevant. I would challenge you to rewrite the question in a manner you feel would meet the quality bar. Mar 20, 2013 at 5:00
  • Your example is not the same. Excluding the poor English [which normally I don't think should be excluded] yours is a subjective question and mine is not. Mar 20, 2013 at 5:04

Many users feel your pain - but the more experienced will probably answer their own question after a few hours or perhaps days if appropriate... Not least for potential better answers that they may have missed.

Sadly, the vast majority of the community react in a negative way if you post your own answer very rapidly. If the original doesn't have sufficient and wider value, they'll downvote anyway. People are fickle!

Personally, I'm keen on self answers if they make sense, but much like everyone else, I question answers very quickly for fear of poor initial thought or lack of basic research. If you demonstrate your reasoning, you'll get an upvote from me!

  • 1
    It is unfortunate that people don't understand the general acceptability of self-answered questions. We even see moderator flags about them sometimes. Mar 20, 2013 at 16:13

Despite your best intentions, it is a low quality post. At the very least it comes across that way. I would have downvoted, then flagged if it wasn't improved. But it is frowned upon answering right away.

  • 1
    I've posted the same comment on another answer already but I would challenge you to write the same question in a "higher quality" fashion. I'm making the assumption we all believe this is a question someone could have and type into Google/SO/etc. Mar 20, 2013 at 4:26

I agree with all the boilerplate comments:

  • the question should be intelligible (so that somebody familiar with the subject matter can understand it without needing to read the answer first, à la Jeopardy),
  • the question should be general –– something that other people may want to know (i.e., avoid getting flagged as “too localized”), and
  • the answer should be useful and reasonably self-contained (i.e., not just a link, nor heavily dependent on an external site), and not primarily self-promotional.
  • Also, if you do answer your own question, you should probably wait a few hours (or days?) before accepting it, so as not to discourage others from answering.

But I see people saying that the OP should belabor what research he did and what he tried to solve the problem.  I feel like these people and I are from different planets.  Oh, sure, in the normal case, those are important, because

  • if the OP did some research (has “taken the time to try to help” himself), I know he’s not a “pleez send teh codez” kiddy, and I get a sense that he’s ‘worthy’ of my spending some of my time to help him (sorry if that’s a politically incorrect attitude), and
  • if he says what he tried (and I believe him), I know what not to do if I attempt to solve the problem myself.

But neither of these applies in the case where the OP is posting the answer along with the question.  This is a case where the OP

  • is trying to bolster SO’s knowledge repository (which, as has been mentioned before, is explicitly encouraged),
  • is trying to show off how clever he is (which is implicitly encouraged; the reputation system does that), and/or
  • is mildly curious to see whether there are better answers.

So I wouldn’t put a lot of effort into solving a question like that, unless I had time to kill and was looking for something to do.  (Would you?  Why?  Just for the reputation?)  The only people who should be answering such a question are those who just happen to already know a better answer, and what do they care what process the OP went through in the course of discovering his answer?

  • The reason we ask for research is not because we're trying to establish the user's programming chops. Whether or not someone is a “pleez send teh codez” kiddy should have zero weight in your evaluation of the question. The reason we ask for prior research is threefold. 1) It gives you a starting point to solve the problem (this doesn't apply here, as you noted) 2) It establishes the problem is non trivial, i.e. it is worth addressing here 3) Prior research proves that a question is unlikely to already be addressed on SO.
    – user200500
    Mar 21, 2013 at 2:25
  • Unfortunately, it is clear the OP didn't do his research here, because the answer to his question is already found here (I found this from a couple of minutes of googling, having never used GD before). All the OP has posted is an abstraction of that approach, either because he didn't look around enough, or because he is promoting his Github. It is important not to take a classist approach to evaluating content. We hold "script kiddies" to the same quality standards as experienced programmers.
    – user200500
    Mar 21, 2013 at 2:29

You must log in to answer this question.

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