惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
D
Docker
有赞技术团队
有赞技术团队
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
H
Help Net Security
美团技术团队
MyScale Blog
MyScale Blog
B
Blog RSS Feed
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
G
Google Developers Blog
月光博客
月光博客
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs

Arpit Bhayani

Temporal Primer - Building Long-Running Systems What Matters in Production RAG Structure of Every LLM Chat How LLMs Really Work Your Monolith Is Already A Distributed System Databases Were Not Designed For This BM25 JOIN Algorithms Venting at Work Comes at a Reputation Cost Why Half Your Skills Expire Every Few Years Multi-Paxos - Consensus in Distributed Databases MySQL Replication Internals Bloom Filters When You Increase Kafka Partitions Product Quantization The Q, K, V Matrices The Day I Accidentally Deleted Production How LLM Inference Works What are Blocking Queues and Why We Need Them Heartbeats in Distributed Systems How Writes Work in Apache Cassandra Redis Replication Internals How to Handle Arrogant Colleagues at Work How Does a CDN Handle Content Replication You Can't Fix Everything on Day One When Emotions Spill Over at Work Why gRPC Uses HTTP2 Meetings With No Agenda Are a Waste of Time Career Longevity Beats Constant Job Hopping Stay Relevant at Higher Salary Levels
The XY Problem and How to Avoid It
Arpit Bhayani · 2025-05-22 · via Arpit Bhayani

We often focus on the wrong problem when asking for help. Instead of describing what we actually want to achieve, we end up asking about a side issue, i.e., 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 handling image uploads. If you had asked about photo uploads, someone might have shown you a much simpler approach.

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

You can and should always start with context. A bit of background helps others understand the bigger picture. Then, state your end goal clearly. What does success actually look like?

Be open to alternative solutions, even if they go beyond your original plan. Sometimes the best fix isn’t what you imagined at first. A fresh perspective can save you hours of unnecessary work.

Show what you’ve already researched or tested. It signals effort and prevents people from repeating what you already know. Plus, it helps others pick up right where you left off.

Here’s an example: Instead of “How do I decode base64 in Python?” Try “I’m building an image upload feature and need to store uploaded photos efficiently. What’s the best way to handle this?”

Before you ask, check yourself: are you describing Y, or explaining X?

Focus on the real problem, not your first guess at the solution, and that’s how you get better answers and solve the right issue.