The Most Important Question

How Do I Ask a Good Question?

Posted by 'Tine Zekis on June 05, 2015 · 5 mins read

Assignment: Cultural Blog | Questions

For this blog post, I was assigned to research the art of asking good questions in the world of coding. As an educator, I have actually already done a lot of study around asking questions. However, I did find this article very helpful in formatting a good question online. It is certainly possible to ask a question and never receive an answer, or to receive answers that don't help you understand what you were hoping to. For this reason, it will be important to follow these steps to increase the possibility that your question will be answered in a way that is helpful to your needs:

  1. Research

    Hopefully, before you are posting your question online, you have already conducted some kind of search for the information yourself. If you keep track of the information you found in this search, you may be able to help others understand what information you are still missing. You may even want to provide links to related questions that remain unanswered.

  2. Summarize your problem in the title

    The people who will potentially respond to your question will be looking at the title to determine whether to keep reading. It is important to make sure that your title is specific enough to draw in someone who has knowledge on the subject. I thought these examples from the stackoverflow article were excellent, so I stole them:
    • Bad: C# Math Confusion
    • Good: Why does using float instead of int give me different results when all of my inputs are integers?
    • Bad: [php] session doubt
    • Good: How can I redirect users to different pages based on session data in PHP?
    • Bad: android if else problems
    • Good: Why does str == "value" evaluate to false when str is set to "value"?
    Be sure to include error messages you have come across, key APIs (application program interface), and any unusual situation that makes your question unique from (or similar to) other questions you've seen asked. Also, make sure your spelling, punctuation, and grammar are correct in your title, since this is the first thing people will see. Finally, if you're having trouble coming up with a summarizing title, you can choose to write this part last; after writing out the longer version, it may become more clear what the focus of your problem should be.

  3. Describe the problem before displaying any code

    Now is the time to expand on the problem introduced in your title. How did you encounter this problem? What difficulties did you run into while trying to solve the problem?

  4. Make it possible for others to reproduce the problem

    This is where you can include code if that is where your problem lies. Be sure to only include the relevant code. Readers of your question should be able to reproduce the problem with the code you have provided.

  5. Include all tags that are relevant to your question

    The sites that allow you to post coding questions will also have a tagging system you can use to attract users who have knowledge on specific, relevant topics. Make sure you tag the language and API you are using. As you begin adding tags, other related tags may become available. Just make sure that you read the descriptions first if you aren't sure whether they are relevant to your problem. If you want more information on tagging, check out this article.

  6. Proof-read!

    Try to read through your question with fresh eyes. See if you can recreate the problem using only the information provided. Also, make sure you are checking for spelling, punctuation, and grammar before you post.

  7. Post your question and be sure to respond to all feedback

    Once you have posted your question, stick around for a bit to see if anyone comments on it. There may be some information missing that people ask for. Try to respond right away by editing the question to include that information. Also, if someone has answered your question, try out their suggestion to see if it works and give them feedback on whether or not it did.

I hope this has been helpful. Be sure to check in again soon, as I will be revamping the website. I'm also moving into the on-site portion of my program at Dev Bootcamp next week, so get excited! Nine weeks from today, you'll be looking at a full-stack developer. Watch out, world!

Resources: