Skip to content

Instantly share code, notes, and snippets.

@joeytwiddle
Last active August 8, 2023 09:09
Show Gist options
  • Save joeytwiddle/92a729d114b05be8cb228c412567ea4c to your computer and use it in GitHub Desktop.
Save joeytwiddle/92a729d114b05be8cb228c412567ea4c to your computer and use it in GitHub Desktop.

Asking Good Questions

Suggestions to help you ask good questions on StackOverflow, GitHub issues and IRC, as well as when asking colleagues face-to-face.

General rule: Put at least as much effort into the question as you would like others to put into the answer.

Preparation

  1. Check that you have the latest version of the software. (The bug might have already been fixed.)

  2. Check if your problem also occurred in an earlier version. (Is this bug a new regression, or has it always been there?)

Asking the question

Here are some things that can help people to help you:

  1. Provide some context: "I am making a simple app using React Native v3 and expo v2"

  2. Explain what you are trying to do: "I have made a login page, and now I am trying to submit the username and password"

  3. Explain what went wrong. A clear way to do this is to explain what you expected to happen, and what actually happened.

    "When the user clicks Submit, I fire a fetch request to https://localhost:444/foo/bar. I was expecting a success response from the server, but the browser logs an error: Certificate Invalid"

    Avoid the infamous statement "It's not working". This doesn't provide any information that can help to debug the problem!

  4. Provide any error messages. Look for these in the browser's Console and Network tabs, and check log files in the back-end servers.

  5. If you think it is relevant, include technical specs. "(I'm using Firefox 55 and Node v10.4.1)" Even better, check if the specs are relevant, by testing with a different browser or Node version.

  6. Finally, end with the actual question. (A series of statements is not a question!) This is an opportunity to focus on the issue you want to resolve.

    "What should I do to get a successful response?"

You may be able to skip some of the above steps if they are irrelevant or obvious from context, and would only bloat the question. But at least you could consider each one for inclusion.

Aside

If the person you want to ask looks busy, then instead of walking over to their desk and interrupting them, consider sending them a chat message. They can read it and get back to you when they are free.

(And if you do manage to fix it in the meantime, then be sure to close the request. Ideally notes down your solution, in case someone else searches for the same problem in future.)

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment