til

XY Problem

https://label.dev/articles/xy-problem/

A developer wants to do X, and comes to the conclusion that they need Y to achieve it. The developer attempts Y but runs in to problem(s) with the implementation. Not wishing to give up, the developer goes to the maintainer’s tech support forum to ask for help with Y.

The problem occurs when Y is not the best solution for X. The maintainer wants to help, but Y seems like a strange application of their code they hadn’t conceived of. This can lead to an extended back and forth where the maintainer gets more confused as to what the developer wants, and the developer feels that the maintainer is being intentionally difficult.

Such fruitless exchanges can be eliminated if only the developer explained what problem they were trying to solve. This gives the maintainer the opportunity to offer an alternative solution, which is more likely to work.

The best way to avoid an XY Problem is to summarize what you are trying to achieve in the first paragraph when you ask for help with your solution. It doesn’t need to be detailed: one or two sentences is generally enough.