Asking Good Technical Questions: A Practical Guide
A good question gets a fast answer. Learn the structure, the minimal reproduction, and the mistakes that make a question hard to answer.
By Velloreth
Why the structure matters
A question is a request for someone else’s time. The structure is what makes the request easy to grant.
The four parts:
- The goal — what you are trying to achieve
- The attempt — what you tried
- The result — what happened
- The error — the exact message
A question missing a part is a question that needs a follow-up, which doubles the cost.
A template
Goal: I want to serve a static site from a subdirectory.
Attempt: I set base: '/docs' in astro.config.mjs and built.
Result: The index loads, but the CSS 404s.
Error: GET /docs/_astro/index.css 404
Versions: astro 6.0.1, node 20.11.0
Repro: https://github.com/me/repro
Tried: base with and without a trailing slash; a relative asset path.
This is answerable in one read. The reader knows the goal, the attempt, the symptom and the environment.
The minimal reproduction
A minimal reproduction is the smallest example that still shows the problem.
Why it works: it removes everything unrelated, so the reader can run it and see the same result. A reproduction that includes your whole application is a reproduction nobody will run.
The process often finds the answer. Removing code until the problem disappears identifies the cause, which is why the reproduction is worth building even when you do not send it.
A reproduction can be a repository, a code sandbox, or a few lines. The form matters less than the fact that it runs.
Show your work
State what you already tried. The answer should not repeat it.
Tried:
- Restarting the dev server
- Clearing node_modules and reinstalling
- The same code on node 18, which works
This narrows the space. A reader who knows what you ruled out can focus on what remains.
It also shows you are not asking someone to do your work. A question with no attempt reads as a request to debug from scratch.
The XY problem
The XY problem is asking about your attempted solution rather than the goal.
You want to do X. You think Y is the way. You ask how to do Y. The answer is that Y is wrong, and X has a simpler solution.
The fix is to state both.
Goal: I want to count the distinct values in a column.
Attempt: I am trying to write a regex that matches duplicates.
The second line invites the answer “use a set”, which is the real solution.
Where to ask
A public channel when the answer helps others. A question about a library, a tool or a common pattern belongs in public, and the answer is searchable for the next person.
A private message when the question is about internal code or a sensitive matter.
A search first. The answer may already exist in the channel history, the documentation or a search engine. A question that was answered last week is a question that will be answered with a link.
The right channel. A question about a specific service belongs in that service’s channel, not in a general one.
In a chat channel
Post the whole question in one message. A question split across five messages is hard to follow and easy to ignore.
Use a code block for the error and the code. A screenshot of an error is not searchable and cannot be copied.
Do not ask to ask. “Can I ask a question?” wastes a round trip. Ask the question.
Do not @ a person who is not involved. It is a demand on their attention.
Follow up with the answer. When you solve it, post what worked. This is how a channel becomes useful.
When you are the one answering
Answer the question that was asked. A long explanation of a related topic is not an answer.
Say when you do not know. A guess presented as a fact costs more time than an admission.
Explain the why. An answer that says what to do is useful once; an answer that explains why is useful again.
Link to the source. A link to the documentation lets the asker verify and learn.
Be kind about the mistake. Everyone has asked a question that was obvious in hindsight.
Common mistakes
“It doesn’t work.” No goal, no attempt, no error.
A screenshot of an error. Not searchable, not copyable.
No versions. A behaviour that depends on the version is unanswerable without it.
A question that is a request to do the work. “Write me a function that…” is a task, not a question.
Asking in five messages. The reader has to assemble the question.
Not following up. The next person with the same problem finds a thread with no answer.
Asking a person instead of a channel. The answer helps one person instead of everyone.
Arguing with the answer. If the answer is wrong, say why with evidence. If it is right, say thank you.
A quotable summary
A good technical question states the goal, the attempt, the result and the exact error, and it includes a minimal reproduction and the versions. Show what you already tried so the answer does not repeat it, and state the goal as well as the attempt so you do not fall into the XY problem. Ask in public when the answer helps others, post the whole question in one message, and follow up with what worked.
Related reading
For the debugging side, see debugging-strategies-that-work and reading-documentation-effectively. For the broader context, remote-work-communication and mentoring-junior-developers.