I created a bookmarklet that I think other web developers would find useful. I don't have a blog, and it's not big enough for an open source project, so I figured I'd share it on Stack Overflow, in the form:

Q: How can I simplify switching between the same page on dev/stage/live?

A: Use this bookmarklet.

Is that cool?

  • 2
    Go for it. However, I hope you intend to phrase your question a little better than that. Something like, "As a web developer I often find myself needing... How can I do this?" Also, don't answer your question right away. Some may think you are rep whoring. Perhaps mark it CW as a gesture of good will (unless you are a rep whore :) ). – raven Aug 7 '09 at 18:52
  • 4
    @raven: I'm as worried about rep-whoring as the next person, but if you share some genuinely useful code, why shouldn't you benefit when people upvote it? – Graeme Perrow Aug 7 '09 at 18:54
  • @raven, I've updated the question. I wasn't actually going to use those words. I was just trying to keep /this/ question generic. :-) – Patrick McElhaney Aug 7 '09 at 19:42

If you are writing a question about how to perform a certain task and then you answer with your solution, that is alright (although there is a community backlash against that in some circles).

But if all you want to do is post "Hey I made this code, here have it!" that is sure to get closed because it wouldn't be treated like a question.

As far as the FAQ is concerned, answering your own question is okie dokie, even if you are only asking the question to begin with so that you can get your code out there. As long as it's a legit question (something that somebody else may at some point may be asking) it is fine. If you post material which can be attributed as spam (such as a link to your own product or to your own site instead of providing the necessary code on your answer) it will probably be dealt with even more harshly.

Some people on StackOverflow and the other sites do not act kindly towards questions that are immediately answered by the OP because they don't look legit (even if they have good intent), so don't expect to get a parade thrown in your favor or a mass of upvotes for your trouble. That's just the way it is.


I think this is perfectly fine. It's even encouraged by the Self-Learner badge. The only time I would consider it uncool is if you were posting it on your blog and you only posted it here to drive traffic to the answer on your own site. If you phrase it as Q & A and give the full code here, I wouldn't consider that shameless plugging at all.


No shameless self plugs... look for folks who've asked questions where your code is useful, then post as answer.

By shameless self plugs, I mean posting something like here is some code I wrote, come get it... The FAQ does support posting your own question and answering it... TheTXI did a good job explaining that piece and it doesn't seem to get much resentment.

  • 5
    If you have a piece of code that solves a particular question, it shouldn't matter whether the question was posed yet or not or who posed it. If it wasn't posed, pose the question yourself and provide the answer. It may not get treated the best by the community, but there is nothing explicitly wrong with it. It's not exactly the same as posting a link to your company's product (which can be interpreted as spam) since you are just posting the code right there and not expecting any real reward out of it. – TheTXI Aug 7 '09 at 17:08

You must log in to answer this question.

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