How To Ask Good Questions Online

So, you have a question about programming. You want to reach out for help online. Understanding how to ask a good question is essential: the best way to receive a good answer is by asking a good question. This guide will help you with that! This applies to forums, Slack, Discord, and other online communities.

Don’t ask to ask. Just ask.

Avoid questions like

Does anyone here know about Postgres?


Can someone help me?

Just post your question. Whoever knows will help you. Don’t worry, you won’t come across as rude. You can always be polite and say “please” and “thank you”, too.

Recommended reading: Don’t Ask to Ask

Describe what you’re trying to do, not how you’re doing it

Sometimes we confuse the problem we’re trying to solve with the solution we’re developing. When posting your question, always prioritize describing the problem you’re dealing with, not your current solution. This is known as the “XY Problem”.

For example, say you were trying to find what quarter (Q1, Q2, Q3, or Q4) a given date falls under. You struggle with the math and ask for help in rounding up on a number (asking Y) rather than where you started (asking how to find the quarter - which is X).

Recommended reading: XY Problem

Don’t be vague

Avoid vague descriptions like

“It doesn’t work”


“It gives an error”

These phrases provide little information for those trying to help you. Be clear about what happened:

“When I try to search for a user, Rails throws the exception ActiveRecord::RecordNotFound”

Provide context

Where did the error occur? Whenever possible, include the code snippet in question and the error backtrace/log. You can use services like GitHub Gist or Pastebin to share your code.

If you’re using a specific library or framework, mention it. Information about your environment like the operating system, programming language version, and database can also be helpful.

Don’t disappear!

When posting your question, pay attention to the responses and possible doubts that may arise. Taking too long to respond can discourage users from helping you in the future.

Also, if you find a solution to your problem, share it with the community! This can help others who may have the same problem in the future.

Want to learn more?

If you are interested in how to ask better questions, here are some other useful resources: