A guide to askingExplain the real problem

Start with your goal.
Then your approach.

Asking only about your proposed solution can hide the real problem. This is often called the XY problem.

About a 2-minute read

A conversation that stalls

Sara

How do I get the last three characters of a filename?

A correct answer might still solve the wrong problem.

A question someone can answer

Sara

I need to find a file’s extension. I thought of taking its last three characters, but some files end in .jpeg. What approach would work better?

The real goal is visible, so a better approach can be suggested.

How does the XY problem happen?

You want to do X and assume Y is the way to get there. You get stuck on Y and ask only about Y. Someone helps with that step without knowing what you actually need.

Explain your goal and constraints first. Then describe what you tried and why. If a particular approach is required, explain that constraint too.

It is fine to ask about a specific approach. Include the goal and constraints so people can give advice that fits the actual problem.

Before you send your question

0 of 4 ready
A starting point for your next question
Keep the conversation goingAsk in the open

Other projects

Other projects for people who like to learn and build.

Sources and inspirationDon’t Ask to AskNo HelloThe XY ProblemMinimal, Reproducible ExampleTheBestLanguage