Handling X/Y Questions
You're describing X/Y questions. Using your example above, "How do I modify a constant?" is really an X/Y question where someone has decided that the problem that they have (whatever it is) can be solved by modifying a constant.
If the question is well-written and shows some research effort, it will generally be clear to experienced answerers that it's an X/Y question. Luckily, a well-written question will give you enough information to post some insightful comments, and sometimes even reframe the question in order to post a pragmatic solution.
If the question is poorly written, then you might not be able to tell what the OP is really trying to accomplish. In such cases, you can:
- Ask clarifying questions in the comments to invite updates to the original question.
- Read comments from the OP regarding other comments or answers to see if you can gain any insight into what they were really after.
- Vote to close the question for a suitable reason, or write in your own if it's a poor-quality question and no other close reason quite fits.
In my opinion, programming is more about how you conceptualize a problem than it is about finding the "one true answer." With that in mind, helping other users reframe a problem is really the first step in defining a workable solution that fits the use case. When it's an obvious X/Y problem, don't allow yourself to fall into the same trap that the OP did by overly constraining the solution space.