I'm familiar with the expression "barking up the wrong tree" but it means "complaining about something to/with the wrong person". I'm looking for a generalization of that, i.e. "doing X to the wrong item of a set S".
Real-world example (as a software developer): while trying to fix a problem on a program I change a file A
, re-run the program, and see that the problem is still there. After considerable amount of time figuring out why nothing happens, including doing more and more changes to that file, I realize that that file was not involved at all in the problem and I should have done my changes on a file B
, similar to A, that I didn't notice in the first place.
On a small variation of the above, my changes of A would be ineffective because I forgot to do an intermediate step required to apply those changes to the program, like upload A to a server or compile the program.
My colleague called this a "I'm not so smart" effect, but I'm looking for something more specific :)