I need to feed the dog.
I think(!) there’s the bag of dog food in the shed.
The light in the shed is broken so I’m looking for a new light bulb.
But I should look for the dog food!
This is a well-known XY-problem. Having the problem Y, we think of solution X but sudden we realize that we need some help with it.
We ask for help with assumed solution rather than asking for help with initial problem!
Common examples
— How do I extract last 3 chars of the filename?
— %example_in_favorite_language%. Why?
— I need the file extension.
— Well, it’s not always 3 chars. Might be more, might be less or even none.
Use the /(?<=\.).*$/1.
— How do I renew HTTPS certs automatically?
— Check out the Let’s Encrypt manual. In a nutshell, cron or so + some scripting. Why?
— Need it for the service X.
— This service is planned for max. 4 months. In worth case we’ll do it manually in <60sec.
The XY-problem correlates with main JTBD2 principle: always look for deeper reason. It might be pretty far away from current subject and might be achieved in different, often easier, way.
References
-
The
/(?<=\.).*$/regular expression means:
▸.*: take any amount of chars
▸$: from the end
▸\.: prepended by the “dot”
▸(?<=...): but not including the “dot” itself. ↩ -
JTBD — Jobs To Be Done; the framework by Clay Christensen.
It encourages Product decisions based on what Customers really want to do (their “jobs”) and how the Product helps with it. ↩