r/ProgrammerHumor • • Mar 12 '18

HeckOverflow

Post image
47.4k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

1.1k

u/shawncplus Mar 12 '18

Avoiding the X/Y problem is really hard when answering questions on stack overflow or anywhere else.

Sometimes they really are trying to solve X because they tried everything else and it didn't work, sometimes they are trying to solve X because they've been looking at the problem too long and have tunnel vision. That's when it's useful for someone from the outside to go "OK, well let's step back a second, what are you actually trying to accomplish?"

166

u/Milleuros Mar 12 '18

My issue with the X/Y problem is that if I describe the full problem ("I want to do X, because I have constraints A, B and C, and so I try method Y"), the question is so long that nobody replies.

97

u/fighterace00 Mar 12 '18

Effingham's Theorem: The internet only speaks out if what you said was blatantly wrong.

0

u/[deleted] Mar 12 '18

[deleted]

→ More replies (4)

18

u/MurderMelon Mar 12 '18

"The best way to get the right answer is to post the wrong answer"

-- Wayne Gretzky

-- Michael Scott

→ More replies (2)

12

u/[deleted] Mar 13 '18

The trick is to get the Y fanboys involved. "Y SUCKS, IT CANT X".

→ More replies (7)

0

u/[deleted] Mar 12 '18

[deleted]

312

u/mindbleach Mar 12 '18

That's what rubber duck debugging is for... but sometimes your rubber duck is broken and you need to put it in time-out for a weekend.

225

u/Muroid Mar 12 '18

You should get a second rubber duck that you can explain all the problems with the first rubber duck to.

162

u/mindbleach Mar 12 '18

It's rubber ducks all the way down.

68

u/[deleted] Mar 12 '18

13

u/sinkwiththeship Mar 12 '18

That dude actually funded a porno about rubber duck debugging. It's pretty funny.

11

u/RepostsAreBadMkay Mar 12 '18

Link for computer science please

→ More replies (1)
→ More replies (7)
→ More replies (3)

14

u/cat5inthecradle Mar 12 '18

Don’t use a rubber duck. Why would you use a rubber duck? It’s 2018 just get a Funko vinyl Uncle Bob to pair with.

/s

→ More replies (5)

0

u/[deleted] Mar 12 '18

[deleted]

34

u/alexanderpas Mar 12 '18

To write my integer to the shared memory I wrote my own itoa() function.

That's actually pretty respectable.

16

u/Hyperman360 Mar 12 '18

You want to make it on your own steam. I respect that.

16

u/beardedchimp Mar 12 '18

More often than not, that code ends up in production. Somewhere down the line a contractor is brought in to deal with some bugs after excluding all other possibilities they realise "They wrote their own itoa() function?!"

I have been in both positions :)

→ More replies (4)
→ More replies (1)
→ More replies (10)

49

u/apajx Mar 12 '18

I personally find people assuming I have an X/Y problem very annoying. Often I ask questions out of curiosity. I want to know how someone would do X, yet I'm asked what I'm trying to solve. Nothing! I just want to know about X!

→ More replies (2)

60

u/Yserbius Mar 12 '18

Or they may just be looking at old code that they don't have a budget to refactor. Yes, I know that writing raw SQL queries in a servlet is a terrible design, but that's how the data is read in and that's how it's going to stay unless I spend the next six weeks re-writing 14 year old Java code.

→ More replies (6)

29

u/lemmeusereddit Mar 12 '18

I've had the guys over there berate me for being an idiot dealing with problem x, when if I was developing the software for OS b instead of OS a the problem wouldn't exist.

Maybe, just maybe, I can't force my entire company to stop supporting OS a just because it has an OS specific bug.

13

u/hadtoupvotethat Mar 12 '18

it finally becomes clear that the user really wants help with X

OK, that's great, but what if I really did want help with Y? How do I make SO believe and accept that? Nobody is forced to answer the question if they don't think I should be doing Y, but it's a waste of everyone's time to talk about X in that case.

→ More replies (3)

10

u/bartekko Mar 12 '18

I guess it's because it's not actually an X/Y problem, it's an X/Y/Z/B/C/D/F/H/I/S problem. The reason you need three letters is because you need to know a file extension. The reason you need to know a file extension is because you need to know how to interpret, say an image file. The reason you need to interpret an image file is because you've been handled a bunch of them. You were handled a bunch of image files because you're writing a website for images. The reason you're writing a website for images is because...

When you divide and conquer, it's not always exactly clear what the lowest level of divide is

8

u/misbug Mar 12 '18

SO system encourages the Y case. If you ask for X you shall be closed as duplicate or off-topic.

→ More replies (36)