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.

If someone asks how to do XYZ, and you think doing XYZ at all is a Bad Idea™, is it valid to post an answer saying so? You aren't answering the question, but instead, arguing the question's validity. You could do this in a comment, but I don't think comments carry enough weight on occasion.

For example, I came across this today SO1176239; for those not wanting to link away:

I would like to build a wiki based website about professors, so that students can share information and check the reputation of the professor before working for him.

and I really wanted to post an answer that said, "I think this is a very bad idea". (In fact I did anyway, despite awareness that it could get myself flamed.)

Was I wrong? What should I have done instead?

share|improve this question
129  
Why didn't you tell them to use jQuery instead? –  random Jul 24 '09 at 8:39
14  
You'll have to build the website around the professor at nighttime, so that when he wakes up he won't know where he is –  Tom Aug 11 '10 at 11:41
6  
The SO post labeled SO1176239 here doesn't exist. –  Daniel Serodio Jan 26 '11 at 16:46

10 Answers 10

up vote 120 down vote accepted

I think it's a valid answer, provided that you explain why the OP shouldn't do it (which you did in the question you gave as an example). But I would consider also to answer the actual question, too. As in "Don't do it because of A, B and C. But if you decide to do it anyway, I would follow this approach:..."

I have recieved one or two Don't do it answers on my questions, and I find it very helpful to question my own decisions on how to approach a problem. (It also bruises my ego a tiny bit, but that is outweighted by the benefits).

share|improve this answer
37  
agree, it is OK as long as you explain why in a well reasoned way with at least one web citation to back up your position –  Jeff Atwood Jul 24 '09 at 9:27
1  
I answered with a don't do it to a question about using regex to validate the number of spaces in a name. I assume no one minded as it was the accepted answer. –  pipTheGeek Jul 24 '09 at 15:51
16  
A don't do it answer without explaining your reasons is pointless as the OP will probably go ahead and try it anyway –  Casebash Oct 29 '09 at 5:27
3  
Vote up, when theres an answer saying don't do it because of this reason and this is how to better do it is very helpful. Sometimes though people just say don't do it and thats it, very unhelpful. –  Rudiger Jan 24 '11 at 22:41
9  
"at least one web citation to back up your position"??!! Bah, the whole point of rep is that you are the authority. –  CurtainDog Feb 23 '11 at 14:08

It seems to me that there's gradations to this.

There's cases where the poster is trying to do something he or she really shouldn't, whether illegal or immoral or thoroughly unwise. I tend to mention this in an answer, along with any helpful technical information.

There's cases where the poster is trying to do something impossible, and in that case I usually explain why it's impossible, and often make a guess as to what the poster is trying to accomplish so I can offer suggestions.

There's cases where the poster is asking how to use a tool in a screwy manner (wanting reserved checkouts on SVN, for example), and in that case I explain why this is a bad idea and (if possible) how to do it.

An answer that's just "Don't do that!" is useless, unless the poster is asking whether it's OK, in which case it's just mostly useless. It should always be accompanied by reasons. An answer that doesn't respect the poster is also pretty much useless (just downvote the question and have done if you feel that way). However, an answer that tells the poster how to do something stupid, just to strictly answer the poster's question, is worse than useless.

share|improve this answer

"Don't do it" is not a useful answer to a question of "How do I do XYZ?", unless it is embedded into a section of your response.

I usually break down my "don't do that" responses like this:

  • To answer the question
  • Why you should not do it that way

In the past, I was working a personal project just to explore some ideas/concepts. I asked "How do I do X in Y situation?" and received dozens of "Don't Do It!!!!" responses, which then got upvoted (downvoted by me), only one poster actually answered my question.

In my case, I specifically stated that I knew it wasn't best practices, I was just trying to explore. Therefore, the flurry of "Don't Do It!" responses were incredibly unhelpful.

So, because this is a technical Q & A site, you should answer the questions as best you can, to tell the OP "Here's how you do that" or "Here's how you would accomplish that task" maybe with a different approach. THEN, only after you've answered the actual question, should you explain why it is not a good idea. Otherwise, you're just scolding people.

EDIT

In response to RSolbergs comment: "It's acceptable if you are answering "Is it okay to do this?""

If someone is asking "is it okay to do this" then yes, you can say "no" as long as you are backing your answer up. That is not the situation I was referring to. In that situation, it doesn't make sense to have a policy that forbids 50% of the answers.

I'm talking about the situation where someone asks "How do I do XYZ?", if you say "Don't do XYZ" you are literally NOT ANSWERING THE QUESTION!

An analogy. If someone yells at you, "Hey, how do I get out if I'm trapped in a well?" and you yell back "Don't Fall In!"

You can then chuckle at how clever you are, and walk away while that person drowns.

EDIT

In response to Shog9 mention of things which should just not be done.

See "Questions with Nefarious Intent".

Stack Overflow is a technical Q & A site. It is not supposed to be the place for the high and mighty to make judgments on the others. If you feel uncomfortable with the question being asked, then you should not answer it.

I had a discussion with a colleague about whether or not it is possible to create a web page which could access the printer directly and print something. He said it was not, I insisted that it was possible. In a million years, neither of us would ever use this on a production app, it would be DISASTROUS. But, the technical question was intruiging to me, so I put it forth to Stack Overflow. I mentioned that I would obviously never do this, and I still recieved "Don't Do It!" responses. Which were, as I've mentioned over and over, completely useless.

For questions that are concerned with limits of technology, and the possibility of creating some functionality when under severe restraints, I would go to Stack Overflow, because the people there are millions of times smarter than I am. However, once I've laid out the technical question, I am looking for a technical answer, not for someone to preach to me.

I don't mind if someone says "This is a bad idea, I would do this instead, but here is an answer to your question" That is fine, because they have still provided an answer. However, if all they can say is "Don't do that" then I'm exactly where I started.

Technical questions deserve technical answers, and Don't do it does not answer the technical question.

share|improve this answer
    
This answer is completely useful to someone who asks "is it OK to do this....." –  RSolberg Jul 24 '09 at 15:16
3  
On the one hand, i can sympathize: i asked a question looking for legitimate uses for a much-maligned language feature, and was quickly slammed with replies urging against its use in any situation. Not very helpful... On the other hand, i've seen questions asking for help doing things that are unkind or flat-out dangerous to others. I don't want to answer these questions and then warn against using the technique presented in my answer - that's handing a toddler a loaded gun and then asking him not to shoot anything! I'd rather convince him of the danger and help him avoid the entire situation. –  Shog9 Jul 24 '09 at 17:26
6  
I think a better analogy would be if someone asks, "How do I get out of a well after I jump in?" –  mmyers Jul 24 '09 at 17:31
2  
@mmeyers, then on SO, you'd get the response of "Just don't jump in in the first place" –  devinb Jul 24 '09 at 17:36
    
Technical questions deserve technical answers; hypothetical flights of fancy with no real world application are not technical questions. –  CurtainDog Feb 23 '11 at 14:12
    
Absolutely, and additionally `don't do it' answers might be next-to-useless for people arriving at the question via search. –  James May 23 '11 at 16:07
    
@CurtainDog Just because something doesn't have real world application doesn't mean it's not technical. On the other hand, it could be stupid... –  Milind R Feb 5 at 16:34

It depends on the context.

A considered response to a question that is asking for help to something that could be hazardous or illegal (and the latter is a minefield because of the global nature of the forum) would seem helpful to me. A comment should suffice in many cases but an answer may be appropriate on occasions to make the point more clearly or to layout supporting materials and references. More rarely, flagging the post may be appropriate if it is clearly a very bad thing that is proposed.

On the other hand an answer of 'You'd be better off buying a MAC' to a question that asks how to do something on MS Vista would seem wholly inappropriate (I don't use either of those platforms so can remain neutral on such technical matters).

share|improve this answer
5  
Neither Mac nor Windows? I wonder what other alternative is there... BeOS? ;-) –  Treb Jul 24 '09 at 8:28
2  
NeXT Workstation? An abbacus? BSD4.4? –  perbert Jul 24 '09 at 13:04
    
Ooh...NeXT...bet those are getting pretty tough to find by now. –  beska Jul 24 '09 at 17:24
    
@beska: Just use a Mac. The Cocoa framework is basically derived from the NeXT. –  David Thornley Apr 5 '10 at 20:02
    
@David Thornley: I know. I used to work at the OmniGroup aka Omni Development...a company that developed exclusively for NeXT (and now develops for Cocoa). Remarkable how far ahead of the curve NeXTSTEP was in a lot of ways. –  beska Apr 6 '10 at 12:53
2  
And OS/2. Don't you dare forget OS/2. –  ЯegDwight Aug 26 '10 at 12:19

Generally speaking, if someone asks how to do something and you think it's a bad idea, give them some kind of answer to what they want and then explain why you think it's a bad idea (or just what the downsides are) and how they might do it better.

One should avoid preaching one's views. Your answer and your tone should reflect thoughtfulness and consideration.

share|improve this answer
2  
Sometimes it's not a view, nor preaching. 1/0 will cause a problem, usually a divide by zero fault or exception. That's just a fact. –  John Saunders Jul 24 '09 at 11:09
1  
@John: But in that case you're not saying "Don't Do It" you're saying "It won't work." There's a difference, because people usually only say "Don't Do It" on things that would actually work, but don't fit into certain paradigms. –  devinb Jul 24 '09 at 12:20
6  
If I ask you "how do I break into your house and what vulnerabilities in your security system can I exploit", do you "give me some kind of answer" first, or do you just say "Don't do it"? –  Paul Tomblin Oct 31 '09 at 15:33
3  
1/0 isn't too bad in IEEE floating point math; it's just positive infinity. 0/0 OTOH, that's plain bad news. –  Donal Fellows Jun 26 '10 at 16:45

Personally, my most common experience with this is dynamic SQL vs query parameters. If you see someone using dynamic SQL in their question, it's definitely appropriate to assume they don't have a good reason until they tell you otherwise. You may have a different experience, but I at least am not going to let an obvious security issue go unchallenged.

Now, I recognize that not all instances of this issue rise to the level of security problems. For less severe problems it might be better to just let it slide. But even here, I feel that even if the OP knows what they're doing, someone else who reads the question later might not, and it's important to have a well-voted post with the question mentioning that something may not be appropriate most of the time.

share|improve this answer
    
Until I got to the final it's important to have a well-voted post with the question I figured a comment would be good enough. But indeed, an answer stands out much better than a comment. –  Arjan Apr 5 '10 at 17:13
    
@Arjan - a well-voted comment is often good enough, and occasionally I'll do that. But more often it really is a dynamic sql problem and I not only want to suggest query parameters, but show an example as well. And comments just are not conducive to that code example. –  Joel Coehoorn Apr 5 '10 at 17:27
2  
I'm not sure whether to up or downvote this. I agree that the top-voted answer should mention that it is a bad idea, but I adamantly do not believe that the top "answer" should not be an answer at all. As I mentioned at length in my (much maligned) response, "don't do it" is not an answer to a technical problem, mostly because even if they agree with you, they STILL have a problem, and now they have even less idea how to deal with it. That is the opposite of helpful. This means that the best answer would be of the format:... –  devinb Jul 6 '10 at 19:10
1  
"You shouldn't do X because of Y. Z will accomplish the same purpose without the disadvantages of A,B,C". If you do not provide a VALID EQUIVALENT alternative, then it simply isn't an answer. The added note is that when I say "VALID EQUIVALENT" is that it does not involve other technologies/frameworks/products. If it involves changing frameworks or downloading something, then it's a useless response, because you have to assume that the user is in an environment where they can do that. –  devinb Jul 6 '10 at 19:11
    
Well-voted != top-voted –  Joel Coehoorn May 13 '11 at 5:28

I think that in general it is not okay1, here's why:

People searching for the same problem in future will find the question -- but it won't have any useful answers. They might have subtly different circumstances that make the "don't do it" answers incorrect, but if they try to open a new question then it would likely be closed as a duplicate.

Would the Right thing to do in those circumstances be to edit the original question to make it more general, and add a bounty?

If people have to describe the minutiae of circumstance justifying their questions then it could easily make them much longer, harder to read, and less general.

1At least, not without also providing the desired answer

share|improve this answer
1  
No, the right thing to do in that circumstance would be to ask a new question, linking to the original but explaining that your particular circumstances are different and that the answers to that question do not work for you. That's perfectly acceptable. –  Cody Gray Jul 28 '13 at 10:13
    
"If people have to describe the minutiae of circumstance justifying their questions then it could easily make them much longer, harder to read, and less general." This is really true. I think there needs to be a presumption that the full story and motivation extends beyond what the OP wrote in the question. –  Owen Jul 29 '13 at 1:34

YES. If it answers the question. May also give a suggestion on what to do!

Some may say "Dont do it" to this post, oh well.

share|improve this answer
    
(-1) I think it's more complicated than that. I've detailed why in my response. –  devinb Jul 24 '09 at 12:11
    
I've edited my response to incorporate your feedback. –  devinb Jul 24 '09 at 17:08

You can net over 2600 votes that way. The <center> cannot hold it is too late.

share|improve this answer

Late answer, but pure logic tells, that given question pairs only with given TYPE of answer:

  • would you...? --> yes/no
  • is it...? --> yes/no
  • how/why...? --> explanation

So answering your question:

I really wanted to post an answer that said "I think this is a very bad idea". Was I wrong?

  • No, if the question was "is this a bad idea?"
  • Yes, if the question was "how to do this?"

In the latter case, your "it is a bad idea" is technically not a answer at all, so you wouldn't be posting any answer just your thought.

share|improve this answer
6  
This might be true for a help forum, but I feel it doesn't (always) apply to libraries of standard/canonical, high-quality questions and answers that these Q&A sites try to offer: "When you see a question that seems like it might reflect a common problem, don’t just answer it to get a few points. That doesn’t make the Internet any better. Instead, help us build up a library of canonical questions and answers that are more generic versions of the same question [...]" –  Arjan Apr 7 '12 at 10:54

You must log in to answer this question.

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