How to ask a good question

If a moderator or admin can pin this message, it may help some of the newer coders get faster answers to their questions by helping them to understand how to ask a good question.

It is important to remember that when you post to a forum such as this, the people on the other end that are reading the questions… well, we’re people and not a Google search box. What I mean by that, is generally the 1st attempt at asking a question by a new dev is to say… “I can’t do this, how do I do this”. And while that may seem like a perfectly valid question to you, it is almost zero help to any of us trying to answer questions. Because the answer is always “Well… It depends…”

There is no ONE right way to do anything, it all depends on the context of the question. Which is what the previous question is missing… context. When you ask a question it is important to be able to answer 3 things before you start to type.

  1. What is the error?
  2. What did you expect?
  3. What have you tried?

For instance, the question at the top of the JS forum says “How do I do a loop”. Well… what kind of loop? What are you looping over? An object? An array?.. What error are you getting (That was kind of answered by the statement it was crashing the browser, you have an infinite loop… and lastly… What have you tried to resolve it?

Some times just the exercise of asking a better question will provide you the answer before you even ask the question. But, worst case scenario, you will receive a faster answer because the person that reads it will have a better context to your error.

Please do not let this discourage you from asking a question, if you truly do not know how to answer any of those, just ask whatever question you can and people will help, but if you practice asking better questions you will find it makes you a more pragmatic coder and also it will get you better answers.

Happy Coding!!

2 Likes

Hi,

I second that. I saw a question about loops that may be the one you took in example.

The thing is indeed we cannot guess much what’s going on without code samples most of the time. Even if the problem is simple we need to see. Especially if like me you are a visual person.

Also when providing code ideally do it by text. Screenshot may be OK but text allows anyone to copy and try on their own machine or other mean. Fiddle sites are even better for small snippets.

I actually have the opposite quirk of often being too specific. People just don’t read that. So I sometimes add TLDR summary.

My philosophy is help others help you and hence I do my best to provide all I can. But sometimes we have really no clue on a subject. This is when we shall communicate. Remain available to any question potential helping people could ask.

Indeed everybody is encouraged to ask questions. We all do mistakes and we all learn. Just try your best to help others help you.

Cheers.

1 Like

Well - two years ago… :wink:

1 Like