6

How to ask questions on Stack Overflow?

Before asking my question I have searched through Stack Overflow and found no similar questions. Below is the list of searches I've made:

  1. Python print command changed my list contents;
  2. Python changed my list contents after print command;
  3. Python list contents disappear after print command;
  4. Does the print command change Python list contents?
  5. Using Python print command to print a list;

Since I've got no useful result, I asked the question: Unexpected behavior in Python 3: The list contents disappear after printed.

Thanks to ForceBru (answered my question) and Joachim Isaksson (commented it), I could learn and keep coding towards my objective, but my question was downvoted (-1 in my reputation) with the justification that it is a duplicate of Python: calling 'list' on a map object twice .

How could I find that question before posting mine? It did not appear in any of my searches.

I understand Stack Overflow is a place where knowledge is enriched as the ones who know more share their expertise with the ones who know less, and this way the collective knowledge grows and the Stack Overflow knowledge base becomes stronger and more useful, helping a larger community of coders. This only happens if questions are asked and I suppose Stack Overflow's objective is to motivate users to ask questions, so the knowledge gets shared and everybody is happy!

As a Python learner, I have doubts and the biggest one right now is that I don't know how to ask a question without being downvoted.

Besides searching for related questions on Stack Overflow, what are the steps one should take before posting a question?

10
  • 2
    This is one for meta, but do keep in mind that getting marked as a duplicate is a form of feedback. Perhaps you didn't know what search terms to use, but someone else did, and found it for you. The proper response, in my opinion, is to understand the duplicate, and move on or delete your question. Commented Feb 24, 2020 at 13:27
  • 4
    I have searched [...] in StackOverflow and found no similar questions. That is strange because that first search string gives me 11 results, including your question. Are you sure none of them returned similar questions?
    – rene
    Commented Feb 24, 2020 at 13:34
  • 2
    None of your searches include "map", although that's a core part of what you're doing.
    – jonrsharpe
    Commented Feb 24, 2020 at 13:35
  • 3
    "Besides searching for related questions in StackOverflow, what are the steps one should take before posting a question?" Read How to Ask and execute. Commented Feb 24, 2020 at 13:44
  • See also: meta.stackoverflow.com/questions/261592/…
    – rene
    Commented Feb 24, 2020 at 13:46
  • 4
    Just to clarify expectations: You can't be certain that the downvote is linked to the question being a duplicate. The actions are completely independent of one another. It might also not have been the same person who performed both actions. We purposely are not allowed to know this information. On the positive side, you got answers as well as pointers to additional information - not everyone who gets a downvote can say that :-) Commented Feb 24, 2020 at 14:38
  • 1
    Thank you all! I'm still learning how to code, how to learn, how to search for help, and much more. I really appreciate all the answers and comments!
    – Prates
    Commented Feb 24, 2020 at 17:24
  • 2
    "The proper response, in my opinion, is to understand the duplicate, and move on or delete your question." I would say it's generally better not to delete it, especially if your question has a substantially different title from the duplicate so it can serve as a useful signpost. That way, if someone else searches the same way you did, they're likely to see your question and follow it to the duplicate. Commented Feb 24, 2020 at 19:01
  • Make sure you show a summary of the research on your question. That should be fine. Commented Feb 28, 2020 at 20:43
  • You can't. You do your best and this still happens. I asked a question once that literally said this question looks the same but doesn't resolve the issue and is not the same -> link to question. Here are the reasons it is different 1,2,3 ... marked as duplicate of that question anyway. This kind of thing is one of the things about SO that frustrates many people.
    – Rodger
    Commented Mar 4, 2020 at 0:15

2 Answers 2

9

This might be subjective, but in my opinion your searches are too verbose. Just searching "python list behavior" or "python map behavior" might have gained better results. It's important to identify the keywords for what you are trying to find.

Second, I would say that it's not a bad thing to be marked as a duplicate. It's a way for someone to answer your question without having to write an answer, but of course it would have been better if you found that duplicate question yourself.

Finally, don't worry about getting downvotes. It's not a contest. People will downvote for many reasons, occasionally for no good reason. Of course, if you are mostly getting downvotes on your questions you might be doing something very wrong.

1
  • 5
    It's a little too easy to say "don't worry about downvotes". You should worry about them if content is not receiving any upvotes.
    – Gimby
    Commented Feb 24, 2020 at 13:51
4

Search Stack Overflow posts using Google

Not sure how obvious this is, but as a search engine, Google can provide much better search than the internal search of Stack Overflow.

You must log in to answer this question.

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