Thoughts on website ideas, PHP and other tech topics, plus going car-free
How to use Stack Overflow
Categories: Technical

For readers who are unfamiliar with it, StackExchange is a group of discussion boards whose novel approach of peer voting and meritocratic moderation has revitalised the forum as a source of interactive help on the internet. Having learnt how the community works (at StackOverflow, for programming questions) I’ve a few thoughts on how I think the site can be best used.

Feel free to offer feedback in the comments. Bear in mind that this is, of course, all IMO, and probably also slightly OCD. Lastly, do read the FAQ.

Asking questions

It should be obvious that you should look into your problem first yourself. If you are aware your question doesn’t demonstrate prior research, don’t just say “I’ve googled but I couldn’t find anything”; say instead what you did find, and why it didn’t solve the problem. You don’t have to write an essay here, but do try to show that you’ve made an real effort (if only to save your question from down-vote oblivion).

Make questions self-contained as much as you can. Hyperlink unusual references e.g. uncommon software. It is much better to trim examples down to the smallest case; if you must post large items they are better as a Gist or on a pasteboard, to avoid cluttering the question. Avoid linking to filesharing sites such as Rapidshare, since they are often a pain to download from, and may contain malicious payloads.

In general, don’t ask the same question in multiple places; this comes from standard netiquette about crossposting. Ask it on one site, and if it fails to get an answer after a reasonable period of time, ask it elsewhere; don’t carpet-bomb several forums in succession. In cases where you ask the same question on a different forum, always hyperlink to your previous question(s), so people can check if it is already answered. Say something like “I asked this on the Ubuntu forum (see <link>) but didn’t get a solution” in your question.

If you are asked for clarification in the comments, try to avoid too many, or lengthy, amendments in your own comments. It is much better to edit your question and to add the requested information there; you can then respond to the effect of “Thanks @helpfulperson, I’ve updated my question”. This helps ensure questions remain intelligible to new readers after you’ve stopped participating, and saves the need to read through pages of comments to understand the question. For the same reason, it is usually better to improve a post transparently, rather than appending several “Edit:” postscripts. Previous versions are all recorded, so users specifically wanting to see an old version may do so without you needing to clarify what has been added.

Don’t completely change the substance of your question, since this will be frustrating to people who are in the middle of answering it.

Spelling and phraseology

Never, ever, use the phrase “it doesn’t work”, either in your initial question, or in response to someone’s contribution. Always, without fail, explain what program output you expected, and what you got. If someone provides some help, try to use that as a hint for further research and experimentation, rather than something that can be used verbatim – remember that you’re the only person who knows your exact use-case.

Similarly, the phrase “Technology X doesn’t work” is best avoided; it carries with it the implication that you believe you’re not doing anything wrong, and X has never worked for anyone.

Sentences start with a capital, and finish with a full stop, question mark or exclamation. They are usually grouped into paragraphs of three or four sentences. Don’t use more than one consecutive query or exclamation mark, and don’t overuse the ellipsis dots (…), which are rarely necessary in well-written text. Indent your code/markup with the ‘code’ button, for readability.

Don’t add ‘help please’, ‘urgent’ or beg for answers. Try to ask your question in good time.

Try to use correct English spelling, and observe the correct case of proper nouns and acronyms as much as possible. Equally, native English speakers are encouraged not to fuss over minor spelling mistakes – so long as you appear to made an effort with your question. Avoid chat-style words (u, ur, sry, pls, thx, teh), though common acryonyms are generally accepted (imo, afaik, fwiw).


Don’t add code in comment boxes unless it’s a small snippet. Where you do, use a pair of backtick characters (`) to render it in a preformatted style.

It is preferable to update a question than to add significant details across a comments conversation. Updating the question as it should have been asked saves time for new readers, who won’t then have to wade through a conversation to determine the crux of the question.

If you have a small supplementary question, by all means ask it in the comments, but don’t overdo it. Respect the time of the people who help you: if you have a substantial additional query, consider asking a new one. If you like, ping someone who has helped you before with a link to the related question, since they may well be happy to assist you again.

On the Internet, it is considered poor form to ask for solutions to be sent to you via a channel other than the one you asked the question on. So, if you ask a query on StackOverflow, you should be willing to revisit the same to view any responses. Similarly, if you receive assistance from someone, don’t ask for their email/Skype/whatever, since it will look like you’re just wanting a free private support channel. (If you really need private or immediate support, then consider hiring a professional from a freelancer website).

Voting and reputation

Downvoting answers on questions you have asked yourself can come across as ingratitude. So, downvote on poor answers to other people’s questions by all means, but be very wary of doing so on your own. Be grateful that someone took the time to help you, even if it wasn’t quite what you were looking for. Downvote on these only in the rarest of situations.

The community really likes it when people contribute, and conversely is not impressed by people who only take help but never give it. Ergo, if you are new, try not to ask for excessive help from one contributor, especially on items that you could research yourself. Chat requests from beginners are fine, but bear in mind that these can be time-consuming.

If you have low reputation points, go easy on people for having a low accept rate. StackOverflow tries to be a meritocracy – you earn the right to criticise! And, always, do it nicely.


Talk to people who help you, if only to thank them. Don’t just tick a question and believe that exempts you from ordinary politeness – it doesn’t. Similarly, don’t abandon questions – always go back to them, either to encourage more responses, or to say you no longer need the assistance. Discuss solutions in the comments under each answer, as appropriate. However, don’t cut-n-paste responses to all respondents, since this looks like spam (so don’t add “Please can you explain more about that” to every answer – yes, some people do do this!).

If you’ve fixed it, add your solution as an answer, not as a comment or question edit. Adding an answer ensures that the question-answer format remains readable for people who read it in the future. If you received useful help from others, consider accepting a answer even if you solved it mostly yourself – this is good grace.

If you no longer need a response, add a comment. Don’t remove the question text, nor attempt to delete it – this can be extremely frustrating for people in the middle of writing an answer, since it renders their effort wasted. If someone answers the question, consider awarding ticks/points even if it is no longer useful to you; it may still be of use to someone else, and good effort deserves to be rewarded.

If you find that your question would be better asked on a different StackExchange site, flag it to the moderator. Do not re-post your question there, and again, don’t try to delete the original.

It is best to sign up with a distinctive username, rather than the default @userxxxxxx, since it is friendlier and less anonymous. A few biographical titbits and contact details are often appreciated too.


Be careful with accidental discrimination. Don’t assume that your interlocutors are male, unless it is clear from their profile (so, “hi guys” is probably best avoided, since it is not entirely gender non-specific, and salutations are discouraged anyway). Avoid making negative generalisations related to nationality, such as “the poor quality of ten-a-penny freelancers from Elbonia”.

That’s the brain dump for now – phew.


1 Mar 2013: added in a new paragraph regarding requests for offline interaction.

12 Comments to “How to use Stack Overflow”

  1. Thank you for the insight and pointer I’m starting to use Stackoverflow now and you’ve been a great help. I’ll keep in mind the tips and try to be a little tider when posting.
    Thanks again Halfer
    Kind regards

  2. Really nice post, and really helpful to new people on SO.

  3. William Cruz says:

    I need smtp to send millions emails

    • Jon says:

      There’s probably a Stack Overflow question in that, but you need to give it a try first.

      Moreover, do you have permission to email those millions of people? If you are just sending spam, please don’t – it costs a lot of money to clean up the mess it makes.

  4. Jeff says:

    You recently downvoted a question I had on stackoverflow and I think it could be done in a better manner Yes I had some typos but in doing so you made it much more likely to remain unanswered. Some communication methods work better for certain users and others for other users but even though your reputation is very high. Altering or down voting any question that does not EXACTLY meet you SPECIFIC criteria is not very conducive to a growing community. If the question exists and can be answered leave it alone it does no harm as it stands. If the (stack overflow, or Stack Overflow, or SO–case in point) routines for entering questions is met then leave it alone. With all the users and people looking for assitance try answering the questions instead of nitpicking the syntax. Everyone knows that iphone and iPhone mean the same thing what is the big deal same goes for ios and IOS.

    • Jon says:

      Hi Jeff. Would you add a link to your question? I’ve had a quick thorough look through my recent edit history, but cannot find the one you are referring to.

      I frequently fix readability issues, but unless it is completely unreadable, it doesn’t sound like something I’d downvote. I’ll happily take a look at it again, if it is still published.

      For what it’s worth, the reason editors are particular about case and formatting is that questions on Stack Overflow are for future readers, and not just for the individual poster. I take the view that Stack Overflow is closer to the Wikipedia model (careful writing about actual problems featuring solid research) than the forum model (slang, text-speak, poor spelling/grammar, gimme-the-codez).

  5. Sandeep says:

    Thanks for the edit (, but was the downvote necessary? Does your edit ensure a response post downvote?

  6. Mitchell Andrew Abbott says:

    Thank you for everything you do, you have helped me so much with your corrections.

    I am grateful for your existence!

  7. Minhajul Islam Mithun says:

    //i write this c programming in codeblock, can run , no problem…but i need to run this code in visual studio , caanot run ….will you plz help me to convert in visual studio >
    even i cannot post it on stack overflow.

    struct Player{
    char name[30];
    int minimumTurns;
    int accumulatedValue;
    int numTimes;
    int won;
    int diceThrown()
    int r = rand() % 6 + 1;

    return r;
    void playerTurn(int minimumTurns, int *acValue, int *thr, int count[])
    while(*acValue < minimumTurns){
    int a = diceThrown();
    printf("%d ", a);


    if(a == 1){
    *acValue = 0;
    else *acValue += a;

    void playerPrint(int i, struct Player players[])
    printf("Player's name: %s \n", &players[i].name);
    void refresh(int *numberOfplayers, struct Player players[], int count[])
    int j;
    for(j=0; j<numberOfplayers; j++){
    players[j].accumulatedValue = 0;
    players[j].numTimes = 0;
    int k;
    for(k=0; k<7; k++){
    count[k] = 0;
    void playGutsy(int *numberOfplayers, int *numberOfGames, struct Player players[], double stats[], int count[], int *totalThrw)
    int j;
    bool flag = true;
    for(j=0; j= 101){
    flag = false;
    printf(“***** Winner: %s *****\n”, &players[j].name);

    void FinalTable(struct Player players[],int numberOfplayers)
    printf(“Final Table\n”);
    printf(“\tplayer\tRisk Factor\t\tTimes Won\n”);
    int i;
    for(i=0; i<numberOfplayers; i++)
    printf("\t%s\t%d\t\t\t%d\n", &players[i].name, players[i].minimumTurns, players[i].won);
    void FinalStatistics(double totalStat[], int numberOfGames){
    int k;
    printf("Final Statistics for %d Games\n",numberOfGames);
    for(k=1; k<7; k++){
    printf("\tP(%d): %.4f\n", k, totalStat[k]);
    void stat(int game, int totalThrw,double stats[], int count[]){

    printf("Game %d – Statistics\n", game);

    int k;
    for(k=1; k<7; k++){
    stats[k] = (double)count[k]/totalThrw;
    printf("\tP(%d): %.4f\n", k, stats[k]);

    int main()
    int numberOfplayers, numberOfGames;
    double stats[7];
    int count[7];
    printf("Please type in the number of players: ");
    scanf("%d", &numberOfplayers);
    printf("Please type in the number of games: ");
    scanf("%d", &numberOfGames);

    struct Player players[numberOfplayers];
    int i;
    for(i=0; i<numberOfplayers; i++){
    printf("Player %d:\n", i+1);
    printf("\tName: ");
    scanf("%s", &players[i].name);
    printf("\tMinimum number to stop in a turn: ");
    scanf("%d", &players[i].minimumTurns);

    players[i].won = 0;
    double totalStat[7];
    int k=0;
    for(k=1; k<7; k++){
    totalStat[k] = 0;
    printf("\n***** GAME STARTING *****\n");

    for(i=0; i<numberOfGames; i++){
    int totalThrw = 0;
    printf("Game %d\n", i+1);
    refresh(numberOfplayers, players, count);
    playGutsy(numberOfplayers, numberOfGames, players, stats, count, &totalThrw);
    stat(i+1, totalThrw, stats, count);

    for(k=1; k<7; k++){
    if(i!=0) totalStat[k] = (totalStat[k]+stats[k])/2;
    else totalStat[k] = stats[k];
    FinalTable(players, numberOfplayers);
    FinalStatistics(totalStat, numberOfGames);
    return 0;

Leave a Reply