chapter six

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 solution Y.
  • Y doesn’t work, so we’re asking for help with Y.
  • Helpers focus on Y, but because Y might 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, and Y wasn’t a suitable solution.
ch06 figure 1

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?

6.1.2 10 Rules I Learned About Technical Writing

6.2 Cognitive Biases

6.2.1 Understanding Cognitive Biases

6.2.2 Confirmation Bias

6.2.3 Streetlight Effect

6.2.4 Survivor Bias

6.3 Critical Thinking

6.3.1 Lateral Thinking

6.3.2 Keeping a Mistake Journal

6.4 Knowledge Management