The XY problem
is the problem of asking the wrong question when looking for help with a (programming) task. Rather than ask how to accomplish his overall goal, the asker asks a more narrow question about a partial solution he has come up with.
See also edit
YX problem edit
in the Tcl Chatroom
20:09 < kbk_> Sometimes I run into the YX problem, particularly with the IT department. "Can you set me up to do Y"
"Why do you want to do that" "Because I need to do X" "Why do you think you need to do that" "Because
I need to do W" ... and somewhere around K, I eventually manage to convince them that I'm making a