XY problem - asking about your attempted solution rather than your actual problem.
Or should I write 「XYプロブレム」or should I just describe the "XY problem" word literally (to get the close meaning of "XY problem" word)?
Edit: I will explain more with "XY problem" itself
XY problem is actually happens to everyone, not just only programmer. I think describing XY problem in paragraph will be tricky to understand, so I will make the description in points first:
A person has a problem (let's call this X problem)
The person has an idea to solve the problem (let's call this Y solution). Or you can call Y solution is a baseline to solve the problem
The person doesn't know how to do with the Y solution either
The person asks for help with Y
Others are trying to help with Y, but the person (or the others) thinks Y is too complicated (so the Y is useless)
At the end, this finally clear that the user really wants help with X, and the Y wasn't even a suitable solution for X.
Conclusion The XY problem could be described with this (source):
- The person asking the question asks the wrong question (which is related to their attempted solution rather than the original problem), and then finds it difficult to clarify the question because they are stuck on their own solution. The proposed answers are unsatisfactory because they don't address how to implement the author's solution.
- People answering the question find it frustrating because the proposed solution doesn't make sense to them ...
This problem is very common in many Stack Exchange communities (I think Japanese.SE is also one of them). It's like a question has many answers but none of them is accepted by the asker.
This inability to come up with a better solution is called Einstellung Effect (this article has clear explanation about this inability, but you may find the specific explanation in Wikipedia).
The best approach to prevent XY problem is be yourself creative. Keep looking different solutions until you get the best one. In my point, when you have many solutions to a problem, you need to do with your solutions multitaskingly, so you're not falling into Einstellung Effect or XY problem.