Hacker News new | ask | show | jobs
by Coincoin 2984 days ago
What I hate the most about StackOveflow is people continuously questioning the poster's motive instead of answering the question.

That often means that if the answer doesn't involve glittering golden code seeping perfection, people won't bother and will just answer: "Don't do that."

5 comments

In all honesty, quite often the people are right.

I've seen so many questions where the poster comes in and already 'solved' part of the problem by making false assumptions (note: this can be by accident, it's normal for novices and even more advanced programmers to have a lack of diagnostic insight) and then asks 'I want to do this, how do I do this?' which is at that point simply the wrong question.

Practical analogy to one particular style of questions: I have a lamp and a switch, and I don't see any light when I toggle the switch and I go to SO to ask how to replace the lamp. SO people could of course come up with a perfectly valid and acceptable answer and leave it as-is. But SO people might know better and realize such answer might not fix the actual problem, which could be a myriad of other things (no power, no wires, switch broken, I'm blind, ....).

It doesn't matter whether they're 'right'. Answer the question as asked. Chances are the answerer does not understand the context, but made an assumption. Then the answer will be unhelpful and vexing. Just answer the question.

"Some kind of help is the kind of help that helping is all about. And some kind of help is the kind of help we all can do without." -Shel Silverstein

It's a sort of paradox: we all imagine questioning the motivation behind a question will reveal a simpler solution, but are always confident our own motives do not admit one, and would really like it if we don't have to explain ourselves in every quora.
What strikes me as a paradox is the premise that answerers do not have time to 'do my homework' or 'Google that for me' but they do have time to understand my complex real-world constraints in enough detail to make this judgment for me, before answering a question that is a minuscule detail in my overall solution.
Imagine yourself in the shoes of a person who chose to answer questions on SO in their spare time. What could be their motivation?

- To get a sense of pride and accomplishment by helping people who have a problem. They want to dig into what the actual problem is, in order to help the person in the best way. The don't want to solve homework problems because they are not "real" problems.

- To get a sense of pride and accomplishes by answering technical questions as correctly as possible. This type of person might also solve homework problems posted on the site because they enjoy the challenge.

Both motivations exist, and they have different attitudes to the XY problem. You will se both attitudes in this thread.

But not many people will get a sense of pride and accomplishments by answering a question which could be found by a single google query. So why should they use their time on that?

The google query turns up unhelpful SO answers. I’ve noticed you seem to have a pretty fixed idea of the categories questions and answers fall into, and the overall rightness of the state of SO. There isn’t much I can say. You might even be right about the majority case, and maybe my whole experience is outlying. Except there are so many with the same complaints.
Reminds me of the classic "Old Shoe or Glass Bottle": https://weblogs.asp.net/alex_papadimoulis/408925
The problem with this, is that I often find myself reading SO answers after searching something on Google. To stretch the scenario a bit, I'm often stuck on a deserted island with only an old shoe and a glass bottle. In that context, it doesn't matter that a hammer is the right tool for the job.
It's highly presumptious to assume you know better than the person asking. You might, but you might not. The fact that SO serves as a collection of programming knowledge, you do not know better than everyone who will ever search for that question even if you do actually know better than the OP who actually asked the first time.

It would be fine to help with all these other possibilites but part of your answer should... actually answer the question that was asked, as it was asked and not doing so should result in a servere punishement.

It's highly presumptious to assume you know better than the person asking

For me, questioning someone's question, asking more info, pointing out he/she might be doing the wrong thing, ... does not in any way involve me assuming knowing things better than the questioner or anyone. (e.g. for all I know, the asker is way more intelligent and wise and knowing than I am, but just temporarily confused - happens to me sometimes so can happen to others) Those two are orthogonal for me, it's just my nature to always question stuff. Including myself. And this certainly helps in finding solutions. And doesn't lead to me thinking I'm better. Perhaps different sometimes, yes.

your answer should... actually answer the question that was asked, as it was asked and not doing so should result in a servere punishement.

To stick with the enalogy: while the answer 'buy lamp, take ladder, unscrew old, screw in new' might perfectly answer the question, it is in my view completely useless if it doesn't solve the problem. So I'd leave a comment asking for more info. And if someone else would already have given that answer I'll probably leave a comment saying it's rather incomplete. Because it's imo the only way to actually help the OP. Why on earth should one get punished for that? Isn't it the right thing to do?

> it is in my view completely useless if it doesn't solve the problem.

Well, this is exactly the problem I'm describing: you're trying to solve the problem for one user when the answer is for everyone who could ever ask something similar enough to come to the page from a search engine. So ignoring the question and solving the problem might help the OP but it doesn't help anyone else who actually needed to know how to replace a lamp. In fact it's hurt them because now "how to move a lamp" is considered solved by a lot of people but the actual page with the "solution" does not contain one.

Yes I get your point, but again, in my opinion, if there's no Q/A yet for how to replace a lamp, the others seeking an answer should just ask that question specifically. The net result being both the original OP and the others are helped in a clear way. Unless of course someone comes up with an all-in-one answer to the original question laying out all possible reasons why there's no light. But that's the edge between way too broad vs specific question.
> It's highly presumptious to assume you know better than the person asking.

But SO is a QA site - you are only supposed to answer if you indeed know better than the person asking!

I acknowledge there is a grey area with the so called XY question, where the questioner ask about one thing but actually want to achieve something different. But in such cases the correct approach is, in my opinion, to help the OP solve the actual problem they have, not lead them down the wrong path.

I think part of the point here is that you are not just answering OP's question, which may or may not be an example of an XY problem. You're also answering everyone who searches answers using similar terms to those the OP used.

For example, let's say the title of the question is, "How do I reformat my hard drive on linux?" and the body of the question is "I accidentally screwed up my upgrade of Ubuntu by <doing XYZ> and now it won't boot. Can I reformat the hard drive and install again so I can boot?" If your answer is "Are you sure you need to reformat? Have you tried <solution to XYZ>?" then you may be solving OP's root problem but you will be making a useless landing page for anyone searching "How do I reformat a hard drive on linux?"

That is a good point and not easily solvable. I think the best approach is the OP updating the question title and text to reflect the actual problem they need a solution for, eg. <Ubuntu will not boot after doing XYZ.>

I don't think it is helpful to answer the literal question rather than the actual problem, since this is optimizing for a hypothetical future reader at the expense of the actual person having a problem. After all, the future reader might also have the same problem as the current user.

>since this is optimizing for a hypothetical future reader at the expense of the actual person having a problem

Which is fine because there are N potential future readers but only one OP.

So, fix the question.

If the question is "why do I get a segfault?" and we find out he's trying to write C code to title-case a string in-place, and he's passed in a string literal, we can edit the question to "Why do I get a segfault trying to modify a string literal?" or similar.

If the objection is that answering the real question will confuse people, then make the question match the correct answer.

In such cases where the OP and the community agrees, reformatting the question would avoid making a useless landing page.

Or the best answer follows the "here's how to do what you asked, HOWEVER: <detailed description of actual problem and solutions>"

>In such cases where the OP and the community agrees, reformatting the question would avoid making a useless landing page.

And if the question is 10 years old the day I need to reformat my linux hard drive? The OP might not even still be alive. Certainly there will be resistance to rezzing a 10 year old thread to make the question more general.

Besides the XY problem, JFYI known also as the chocolate covered banana:

https://jdebp.eu/FGA/put-down-the-chocolate-covered-banana.h...

there is also the issue about the (missing) Standard Litany:

https://jdebp.eu/FGA/problem-report-standard-litany.html

particularly on a technical resource such as StackOverflow, lack of specifics are a problem (as they often don't allow for correct/effective answers), and in theory the OP asking should well know, being a technical person, the importance of providing background information when asking a question.

The issue is that while the OP might be wrong, someone searching for that exact problem might not and it's extremely infuriating to have those unhelpful comments cluttering your search results.
This is known as "the XY problem": http://xyproblem.info/
(I don't post answers on SO at all, but I do on some of the sibling sites (DBA.SE, SF, SU), so my experience might not be exactly the same, but...)

> questioning the poster's motive

The motive can be important. Where there are multiple explanations and/or solutions this can filter out some that are not going to be relevant or practical for their current situation. Also where what they are asking seems impossible/impractical/misguided/other it can help in providing a better solution (i.e. trying to give them what they ultimately want even if it isn't what they are specifically asking for) or give context that might quieten your gut "don't do that" reaction.

The poster's motive is one of the most important bits of information: Where were you? What did you do? Why? What were you intending to happen? What happened instead?

> "Don't do that."

Sometimes "don't do that" or "you can't do that" is the only suitable answer though (such as where what they are trying to do is impossible, or just wildly impractical, or will open up a security nightmare, or there is a built-in method so they'd be reinventing a wheel, or one of many other reasons) with the important caveat that you don't answer with just "don't do that".

Better is "don't do that because <good explanation>" or "you can't do that because <good explanation>".

Even better still, if what is being asked it actually possible even if it is strongly recommended against: "You shouldn't do that because <explanation> but if you chose to ignore this recommendation you could try <method>".

This may seem off-putting at times, but I believe it is absolutely necessary. When colleagues come to me with questions (which they do a lot), I always ask about the background. And sometimes, I arrive at different conclusions that solve the actual problem with ease.

If you expect a quality answer that actually solves the problem, explain everything. Provide clarification when asked to do so. Also, don't assume hostility and be friendly yourself.

To me, this is a feature, not a bug. In my experience, usually the questioning of motive is well-founded and the poster is really doing something that in a perfect programming world shouldn't be done. Then, if the poster is able to explain why they are forced to take this particular route, people will usually accept it and answer.
No, this is unacceptable. Ideally you should first answer the question, then explain why it shouldn't be done. If you don't have enough time, then drop the second part.

And the reason is not about the OP, the OP is irrelevant in such a site. SO is a collection of programming knowledge. So the problem is that an experienced software engineer comes along years later, forced into doing something they already know is bad but have no choice for some reason (normally some silly job constrained that they simply cannot change), google search to see if anyone has done it and guess what comes up? The exact question on SO but with these useless answers. And since it has been "answered" no one else bothers any more. And I can't come in an clarify why I need it, it's not my question. If I ask again, my question will probably flagged as a duplicate.

If I could change only one thing on SO, it would be that anyone who answers "don't do that", in any form, without answering the question is banned from the site and their response removed.

The majority of people arriving via that search years later probably don't already know, and are less equipped than the experienced engineer to tell the difference.
This is horrible, and reminds me of the programmer mentality in general. I come as a human asking a question, and instead of answering like a normal person, they grill me until I've proven something to them.
>This is horrible, and reminds me of the programmer mentality in general. I come as a human asking a question, and instead of answering like a normal person, they grill me until I've proven something to them.

And even then they probably don't know the answer, and you will have wasted your time and keystrokes. That's why I never attempt to justify myself to someone just because they want me to. If I anticipate that a question I'm about to ask will engender a lot of "why are you doing it that way?" responses, I'll usually address it when I ask the question, but long ago, I got wise to the people who seem to think that if they don't know the answer to a question, it's the wrong question.

Yeah this is common syndrome. An experienced software developer might sense something off in the question, and try to dig into what the actual problem is and find the solution for that. After all, the job of a developer is to solve problems.

E.g. a customer asks - can you make the button so you have to click it multiple times before it reacts? The less experienced (or more cynical) developer say sure, I'm on it. The more experienced developer (annoyingly) ask "what do you really want to achieve"?

The very assumption that there is a larger solution behind my question, and that I am really looking for a best practice with regard to this putative solution, is itself a hasty conclusion. I'm often searching a question because I want to know the answer to that question, so that I can use that knowledge in future solutions. In those cases, not only have you not properly imagined what I'm going to do with the answer, I haven't imagined it either.

I realize that a lot of this comes down to asking hyper-logical pattern completers to stop being hyper-logical pattern completers. And that is in a sense one of the main motivations behind April Wensel's campaign to improve SO.

Exactly...that is why you ask clarifying questions. And if you post a question on SO is a great idea to include contextual information which helps clarify what you are trying to achieve.

A bit of context like "I'm on an embedded platform, so I can't use heap allocation", or "the HTML is for an emai'l, so I cant use JavaScript" also goes a long way to avoid the annoying "why don't you just..." comments.

If you peruse SO you will notice quite a lot of questions simply does not make any literal sense because of misuse of terminology or just lack of understanding. Very often questions arise exactly because the person have a wrong mental model of how the system is supposed to work. Which means the question will reflect this misunderstanding in the way it is posed. Just answering the literal question is not helpful and in many cases simply not possible.

>Just answering the literal question is not helpful and in many cases simply not possible.

If you can't answer it, or don't want to answer it, then don't answer it. But please don't be the annoying, condescending know-it-all who is always there to provide an unsolicited lecture.

>E.g. a customer asks - can you make the button so you have to click it multiple times before it reacts? The less experienced (or more cynical) developer say sure, I'm on it. The more experienced developer (annoyingly) ask "what do you really want to achieve"?

That might be an appropriate response to someone in your own company. But when it's a stranger asking a specific question in a forum where such questions are asked, I give them the benefit of the doubt that they have good reasons for asking their question. If I can't answer it, I simply ignore it.

Can you link to an example of that? (Not disputing your experience, just want to learn.)
It took two seconds to find an example in my stackoverflow browser history: [0]

> Question: Hide Show content-list with only CSS, no javascript used

> Comment: Behavior is supposed to only exist in the realm of JavaScript.

But my favorite example is the following, which I sacrificed a couple of minutes looking for because the exchange was so instructive: [1]

> Question: How can I replace text with CSS?

> Comment 1: To be honest it might be best to use javascript for this.

> Comment 2: The question is how to do it with CSS. I am using a CMS that only allows me to change the CSS, which is why I arrived at this page while googling for the answer, and not a different one. That is why we answer the question that was asked instead of asking why the asker's situation isn't different.

The thing people forget is that the question is not just about the person asking it, but about people coming across the question e.g. through Google who have to waste their time sifting through idiotic non-answers. For better or worse, SO tends to be ranked highly on Google for development-related queries and I've come to subconsciously ignore it because of its uselessness, in general.

[0]: https://stackoverflow.com/questions/17731457/hide-show-conte...

[1]: https://stackoverflow.com/questions/7896402/how-can-i-replac...

For the first question, there are 12 answers providing pure CSS solutions. One of them is marked as accepted by the OP, which indicates it solved their problem.

Then there is a single comment (not an answer) which says "you are not supposed to do that", which have received a single upvote.

You say "people won't bother", but in reality, 12 people have bothered and provided detailed solutions with code. What more could you want?

I don't really see the major problem here.

The second question has 23 answers, the top one having 186 upvotes. And then there is a single comment (not an answer), saying JS is more appropriate for this, and a reply from the OP explaining why it needs to be pure CSS.

Comments are for asking questions, request clarifications and providing information which does not constitute a regular answer. This seems to work exactly as intended. Several answers make it clear that the CSS solution is more fragile and worse supported than a JS solution, so I think it is pretty relevant to ask the OP (absent any information either way) if they couldn't use JS instead.

I really have a hard time seeing the problem here?

> Then there is a single comment (not an answer) which says "you are not supposed to do that", which have received a single upvote.

This comment should be deleted as it's blatantly off-topic and a waste of time. OK, let's forget about question one, since I found it in two seconds.

> Comments are for asking questions, request clarifications and providing information which does not constitute a regular answer.

> Several answers make it clear that the CSS solution is more fragile and worse supported than a JS solution

As you say here, the questioning ("clarification") of the question isn't limited to comments. It's easy to mentally ignore comments, but when you have to read through half an answer just to get past the BS... and besides, the CSS solutions in that thread certainly are fragile and bad, but that has nothing to do with CSS being appropriate or not and more because the answers are, well, terrible. CSS is perfectly capable of doing what the question asked for in a robust manner, and it avoids changing the page on-load which is a bad user experience (not that any web developers actually care...) and certainly no less fragile (assuming JS is even turned on in the user's browser).

The problem is people telling others what they should do, and I don't want random people trying to dictate what I should be doing -- especially not people giving answers like those. Actually, a couple of the answers are OK, and somewhat explanatory, but the rest are just BS that throw code at you, which is useless and a waste of everyone's time. To be fair, web development answers on SO are the lowest-quality generally speaking. I'm pretty satisfied with using SO for answers about e.g. Emacs.

> I really have a hard time seeing the problem here?

Uh, seriously?

I don't follow - are you saying you know of a better solution than the ones proposed in the thread? And you are angry that this better solution is not already posted?
It's worth emphasizing that for the first example, the answer was provided free of charge within an hour. I don't think I agree with any assessment in which this is not an unqualified success.
> It's worth emphasizing that for the first example, the answer was provided free of charge within an hour.

It shows -- the quality of the answer is quite poor.

> I don't think I agree with any assessment in which this is not an unqualified success.

This made me laugh. I guess the only assessment you considered is your own, which simplistically assumed time to answer is the most important factor.

And yet, not a single soul finding this question on Google cares if the answer took an hour or two days. Apart from you, I guess.

> It shows -- the quality of the answer is quite poor.

Are we talking about the same question? https://stackoverflow.com/questions/17731457/hide-show-conte... I'll admit that it's not always easy to judge if an answer is useful to someone else, but it looks to me like it answers the question, the user "accepted" it, and it has 23 points. What makes you say it's "poor"?

> I guess the only assessment you considered is your own

The only strike against it you cite is some push-back in a comment... What else do you have against it?

> which simplistically assumed time to answer is the most important factor.

On top of the user accepting it, it having 23 points, it answering the question, etc.

I mean, I think I would be pleased with the outcome if I were the OP. I think I would be pleased to find that answer if I came from a Google search. If you honestly think that this is an example of "people continuously questioning the poster's motive" and exemplifies what you don't like about SO, then yeah, I don't agree with your assessment. It's not an attack on you, chill out.

> I am using a CMS that only allows me to change the CSS

The problem there is not the person commenting/answering being self-righteous, but the original poster not providing sufficient context for the question. People on the other side of the Internet are no more clairvoyant than anyone else, so aren't likely to guess that such a restriction is in play and currently unavoidable.

> That is why we answer the question that was asked instead of asking why the asker's situation isn't different.

Speaking of self-righteousness: when I see that sort of tone from someone asking for help I tend to walk away and go find someone else to assist (or something else to do entirely).

After reading the exchange on SO, I agree: Questioning motives is the right thing to do. The problem isn't that people are questioning the motives. The problem is that we have to. The question is very reasonable within a certain context, and it is the responsibility of the person posing the question to point out that context.

For me personally, it has happened a bunch of times that I Googled something, which led me to SO, where the answer was "Don't try to do it the way you're asking - the better way is X". I'm really glad I got those answers because I was educated about why what I was trying to do was bad and how to do it properly. The times where I really needed to do it the poor way are a small minority.