6 Beyond Code
6.1 Communication
6.1.1 The XY Problem
The XY problem is a common communication pitfall where someone is asking about an attempted solution (Y) instead of the actual problem they’re trying to solve (X).
Here’s how it typically plays out:
- We face a problem
X. - We don’t know how to solve
X, so we’re trying to get a working solutionY. -
Ydoesn’t work, so we’re asking for help withY. - Helpers focus on
Y, but becauseYmight not make sense or isn’t the right approach, they struggle to help. - After many back-and-forths, helpers realize the real problem is
X, andYwasn’t a suitable solution.
The issue with the XY problem isn’t that we’re trying to solve X with Y. Instead, the issue arises when we ask about Y without including the context of X. The XY problem can lead to wasted time and effort trying to address a secondary problem and even frustration for the helpers.
Here’s an example of a less helpful way to ask for help:
I’m facing an issue with a regexp:
[@`. For some reason, my system reports a parsing error. ← Y[@]+@[@]+\.Can you please help me out?
A better version includes the context of the original problem:
I’m facing an issue with a regexp:
[@`. For some reason, my system reports a parsing error. ← Y[@]+@[@]+\.For context, I’m trying to validate customer email addresses using a regex. ← X
Can you please help me out?