Don't Fall for the XY Problem, Ask the Right Questions

Arpit Bhayani

curious, tinkerer, and explorer


We often focus on the wrong problem when asking for help. Instead of asking about X, we end up asking about Y. Let me explain…

Say you’re implementing image upload in your service, and while doing so, you get stuck converting a base64 string into an image. So, you ask for help decoding base64.

But the real problem isn’t decoding base64, it’s actually handling image uploads. If you had asked about photo uploads, someone might have shown you an easier way to solve it all.

That’s the classic XY problem: you ask about your assumed solution Y, instead of explaining the actual problem X you want to solve.

  • say what you are really trying to do
  • don’t assume your solution is the only way
  • explain the full problem, not just the code snippet
  • describe what you have already tried

Before you ask, check yourself: are you asking about Y or explaining X? Don’t get trapped by the XY problem, solve the right issue and not just your guess at it.

Asking the right question can only take you to the right answer.

Arpit Bhayani

Creator of DiceDB, Staff Engg at Google Ads and Dataproc, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses


Arpit's Newsletter read by 125,000 engineers

Weekly essays on real-world system design, distributed systems, or a deep dive into some super-clever algorithm.


The courses listed on this website are offered by

Relog Deeptech Pvt. Ltd.
203, Sagar Apartment, Camp Road, Mangilal Plot, Amravati, Maharashtra, 444602
GSTIN: 27AALCR5165R1ZF