I'm not sure how to ask a good question, but I do know how I go about answering a coding question. So I'll approach it from that perspective and try to work my way backwards.
For me to answer a coding question, I need to be able to recreate the problem on my end. This is fundamental. If I can isolate the problem, then I can begin to understand it. It's only after I've understood the problem that I can hope to come up with possible solutions. Details and specifics in the question are obviously crucial to recreate the problem. The more exacting my re-creation, the more tailored and specific any solution I can offer will be to the original problem. Conversely, the less authentic my re-creation, the less accurate any solution I can offer will be to the original problem.
So to come full circle, I think the ideal information to convey in a coding question so that others may faithfully re-create the problem are the following:
- This is what I am doing.
- These are the conditions I'm doing it in.
- This is what I want.
- But this is what I'm getting instead.
- Help!
The less ambiguity and vagueness to each of these parts, the better and more attuned the answers will be to the question.
This has been helpful! I will bear this in mind when I ask questions.