The X/Y Problem (as illustrated by poorly drawn horses)

I love the X/Y problem, but I don’t love when people fail to apply it, or even haven’t heard of it. It is, in my opinion, one of the fundamental things to learn in programming, and that goes double for games, especially when working in a team.

So what is it?

The very dry, very boring explanation is: when somebody asks for a feature, always ask “why”, rather than just accepting the “what”. More detail from a smarter human here: https://xyproblem.info/, I’m just going to focus on making this amusing.

Fair warning: If you’re not good with the idea of using stupid metaphors in place of actual software features, you might want to run away now (screaming optional).

On with the horses

You’ve just received a very strange request for a feature: somebody has strolled up to you and said “I want a pony!”. They’re serious, a pony is what they want, and what they need, and they’re very clear about it being a capital P pony.

So you set out to make the best damned pony you reasonably can. You’re probably thinking something like this:

Original public domain image from The Rijksmuseum

The experienced beings in the audience may have spotted your first mistake. You didn’t enquire what the pony was for, why do they want it, and why a pony.

I get it, it’s Friday afternoon, it’s 4.30pm, the person who requested this has a history of requesting Weird Stuff, and you’re still halfway through their previous request of 500 teacups, one digestive biscuit, and curiously, no tea. So you just get on with it.

You’re happily carrying on with building your pony, and you get to the point where it’s mostly able to do pony stuff. Problem is, it looks like this:

This pony is clearly not ready for production, or even remotely finished.

Feature Requester has been doing some thinking in the meantime, and points out to you that the pony should be able to carry a person. Fine, ponies are supposed to be able to do that, so you add a saddle.

But Feature Requester comes back, and says “Oh, didn’t I mention it should be able to fly?”. So you backlog actually finishing the pony because if it starts to look even more like an actual pony it definitely won’t be able to fly. Time to add wings, I guess.

You show this to Feature Requester, who sighs and shakes their head. “I wanted it to be able to go faster than this”, they say with a tone of voice that’s somewhere between disappointment and implying you have the brain of a particularly uncreative iguana.

But that’s okay, you can augment the flight speed by having rocket boosters. Pony can fly, pony can fly real fast. It’s not particularly safe but at least the rocket exhaust isn’t pointing directly at the saddle. Nobody wants lightly toasted toes.

Feature Requester is now happy with the flight speed of a traditionally non-flighted animal, and you’re starting to get a little annoyed at how much your Perfect Pony Programming is getting polluted with things a pony isn’t even really supposed to do.

“Oh, yeah, the pony? It needs to be able to survive without water”.

Your brain just flashes a massive warning sign that reads simply: “WHAT”. But you carry on, you’ve started now, no point in starting a new pony when you’ve been working on this little guy for weeks.

In a flash of inspiration, and more than a little bit of idea theft, you give the pony a stillsuit. Now he can make his own water (from something you vaguely remember reading when you were 15).

Pleased with this compromise, you sit down and start thinking about pulling “finish the pony” out of the backlog. But Feature Requester, bless ’em, is back again.

“I think the pony should be able to survive without air, that would be easy right?”, they say in a message received at 6.45pm from their phone. You saw it because you’re now massively behind on the pony feature and wanted to do some sneaky catching up.

You sigh, shake your head, and start designing some kind of pony helmet. It’s trickier than you’d think because a pony has a surprisingly long head and most helmets are designed for something more orb-like.

Feeling a sense of victory, surely the pony is perfect this time and you can get back to making your perfect pony (with all this weird nonsense tacked on, but we just have to live with it now).

“Hello!”, reads a message from Feature Requester. Just hello. You start to feel a bit like you’re sinking through the floor.

You respond with a message that is trying desperately not to say “Please just get on with it, what do you want now?”.

“I just realised that the pony also needs to be able to carry a week’s worth of cargo. Sorry I didn’t mention it earlier but I only just thought of it”.

You’re starting to feel a bit sorry for this poor pony, it’s already looking a little bit like it’s begging for just a fresh carrot and a packet of polos. Maybe a nice field to run around in. But you persevere.

This poor pony is running out of space where you can plausibly add more stuff to it. But with some clever trickery, you work out that you can dangle the cargo like a hot air balloon underneath the belly. It’s all starting to look a bit silly but it still technically fits the request.

You send your flying, rocket powered, self sustaining, cargo carrying pony off to feature requester. It’s better to confirm that this is what they want now rather than finish the job and have them not want it.

“Yeah this is perfect!” they exclaim with joy. “I’ll get on with using it right away”.

You hedge your bets by pointing out that bits of this pony might be quite hard to use, like the wings keep hitting you in the face when you’re sitting in the saddle, or it’s really hard to see over the helmet so you might have to lean to the side.

Feature Requester isn’t listening, they’re poking and prodding the pony who would really, really like to just go back to the stable and contemplate the meaning of its existence.

You finally ask Feature Requester what they wanted the pony for, even though now, you’re not sure you want to know. But it’s your responsibility to know, because you have to maintain this pony.

“Oh, I wanted to be able to go to the moon”.

So after all of that, what they really wanted was…

The moral of the story is: When asked for a pony, do make sure that what you actually should be building is in fact a pony, and not a rocketship.

Comments

One response to “The X/Y Problem (as illustrated by poorly drawn horses)”

  1. mikyung Avatar
    mikyung

    Too true it hurts 😭

Leave a Reply

Your email address will not be published. Required fields are marked *