What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

I'm relatively new to SO, but I've noticed a trend - certain categories of questions to which the answer is "change the question."

soulmerge posted the quintessential reply to one of these questions by linking to the article Pounding A Nail: Old Shoe or Glass Bottle?

Some examples:

  • How do I parse HTML or XML with regular expressions?
  • How can I create a Singleton?
  • How do I write my own encryption routine?
  • How can I optimize this in-memory operation that I haven't profiled?

While there are a few legitimate use cases for some of these techniques, the poster's case probably is not one of them. Often the correct answer is "Don’t do it" (or at least don't do it that way). Unfortunately, these type of responses generally do not go over well with the original poster.

A similar category is argumentative questions, such as "Does TDD really work?" Often the poster will argue at length with any affirmative answer.

My question is twofold:

  1. What are other categories of this nature that people have noticed?
  2. What are the best ways to handle these sorts of questions?

Thanks!

share|improve this question
4  
+1 for the parsing HTML/XML with regular expressions. So sick of that question. –  cletus Sep 5 '09 at 1:44
1  
I find that the more your knowledge of regex, the less likely you are to use it. –  Brad Gilbert Sep 8 '09 at 0:55
    
...and today a coworker actually came up with a use case for parsing XML without using a DOM (although a SAX parser might be appropriate). A client provided an 8GB XML file consisting of a list of (non-nested) elements, each of which needs to be shoved as-is into a SQL database. –  TrueWill Sep 11 '09 at 0:32

5 Answers 5

up vote 19 down vote accepted

I'm only going to address the way to handle these questions.

My view is that unless you have a really good reason (like it's an incredibly bad idea or its incredibly hard) that you should, at a minimum, answer the OP's question.

After you do that you can then suggest why they shouldn't and what they should do instead, if appropriate.

share|improve this answer
    
Thanks - you're clearly an experienced user, and I remember seeing an excellent answer from you to a question. May I ask why you feel it's good policy to answer the question as asked first? –  TrueWill Sep 5 '09 at 1:51
9  
Programmers are judgemental folks and we don't usually like someone telling us what to do so it's less adversarial to take a moment to answer the question as asked (it also helps demonstrate that you know what you're talking about). Also, if someone is going to be doing the wrong thing, they may as well do it the right way (if that makes sense). –  cletus Sep 5 '09 at 1:57
2  
@cletus: I'm sorry, but I disagree. Don't help people shoot themselves in the foot, even if they have eloquently asked you how to do that. –  John Saunders Sep 5 '09 at 2:41
2  
@John: I've had a seen a lot of times where a user can't change a DB design, even though what they're working with is horrendous. C'est la vie. –  Eric Sep 5 '09 at 2:53
1  
Usually the question makes it clear if they're under constraints they can't change or it becomes obvious but remember the answer is there not only for the OP but for others that find the question. So if they can't change it thats why you answer the question as is (right or wrong). If they or someone else can, that's why you tell them the right way. –  cletus Sep 5 '09 at 3:13
4  
@John: it's naive to assume people can always do things the right way but even if they can it's basic human psychology that if you answer their question and then give them the right way they are far more likely to be open to that. –  cletus Sep 5 '09 at 3:14
1  
@all: I'm not talking about doing things in "not quite the right way". I'm talking about things like doing new web development in WSE, or running background threads in ASP.NET without synchronization, or "sending XML files" to web services. These are cases where the requirement is quite likely incorrect. If it turns out that they must do it that way, fine; answer the question. But don't assume they really must do it the way they specified if they specified something crazy or stupid. –  John Saunders Sep 5 '09 at 4:21
5  
It's important to realize that you often don't get the whole picture when you read a question. The questioner may have a good reason for asking a question even if the question itself seems to ask for something "wrong." And even if the questioner doesn't have a good reason, somebody else who reads the question at a later date may have. By answering the question and explaining why it shouldn't be done, you're helping both the people who have good reasons, and those who just don't know better. –  LKM Sep 5 '09 at 10:55
    
@John I feel that if you aren't actually answering the question that was asked, a comment works just fine... The voting system for the comments will make it clear when it's an important consideration. Of course, then, you might lose out on some rep. But I really think answers should be answers. –  TM. Sep 6 '09 at 15:08

Answer the question (even if the answer is, "You can't."), then post the right way.

That be my general approach. It's usually appreciated, too, since sometimes people are backed into a corner at work, and could use the outside world telling them, "NO!" to show to their colleagues.

share|improve this answer

To add to the great answer that Cletus posted:

Sometimes a person has to do something less than ideal or stupid for reasons that are beyond their control (management, client demands, etc).

Or there can be some detail of the implementation that makes the "ideal" path not so ideal after all.

I've been in the former situation and it is already frustrating enough to have to do it The Wrong Way without someone telling you to abandon that route.

In those situations, I knew how to do it The Right Way. The reason is because The Right Way is simple and straightforward.

I have to ASK how to do it The Wrong Way because it's a crappier way to do it, and I never tried to do it the Wrong Way before.

It's a double-whammy of frustration to get non-answers that say "Don't do that, it's the WRONG WAY!". I was already frustrated that I had to resort to the wrong way, now I am even more frustrated because nobody will answer my question and they treat me like I'm a bit stupid (although most users are nice, some get rude).

I appreciate suggestions for better ways of doing things. However, these are usually good for comments, or for "asides" in an answer that actually addresses the question that was asked.

Good answer:

Well, I'd recommend doing X because it is really a better because of Y.

However, if for some reason you HAVE to do it this way, here's how: Z

Bad answer:

You're doing it wrong. You need to be doing X instead.

share|improve this answer
6  
If you know it's wrong, and you still have to do it, you should explain that. That way people can tell that you're not inexperienced at the task at hand. –  Super Long Names are Hilarious Sep 5 '09 at 4:06
1  
Just tell me you know it's stupid but you have to do it that way. That's all. –  John Saunders Sep 5 '09 at 4:22
    
@ChrisLutz @JohnSaunders yes, that's the best way to get results. However, I did have one question where I explained clearly that management was giving the thumbs down to a particular solution, and the top-voted answer was one that just said "But it's wrong, push back!". I just feel that a question that is very specific is probably looking for a response to that specific problem. As I said before, I DO think it is important to note the best practices, but the most important aspect of SO is the whole Question/Answer thing. –  TM. Sep 5 '09 at 7:16

A similar category is argumentative questions, such as "Does TDD really work?" Often the poster will argue at length with any affirmative answer.

Sort of the opposite, really... I mean, presumably the guy asking how to parse XML with regular expressions really does want to parse XML; this latter sort of question strikes me as at best heel-dragging, and at worst, a case of the author fishing for arguments to use against a practice or tool being forced upon him. In the most blatant examples, an author will come right out and state his hatred for X, follow it with a rant, and then finish up with a half-hearted question seeking agreement.

Frankly, I consider the practice to be border-line trolling. If you think you can provide a well-reasoned answer, go ahead and do so... but don't engage the OP in arguments, and be aware that his attitude may result in the question being closed or flagged.

share|improve this answer
    
Agreed - good answer! +1 –  TrueWill Sep 5 '09 at 14:39
  1. I would imagine these sorts of questions will always come up, and probably even more frequently as SO grows and attracts more new posters and one- or few-time posters. The best way to handle them is probably to just answer them honestly (i.e. that is not a good idea, do this instead), and if those answers are good, they will naturally get voted up. The OP may not mark an accepted answer, but that's probably ok, because if they're of the mindset that being told a better, different way is not ok, they probably won't stick around very long.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .