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


I just wrote an answer to this regex question, which was trying to match numbers in written format (e.g. 1,234,567.89). I wanted to be thorough, since I've seen this task come up a lot, both on SO and in real-world code. When I finished, I found 7 new quick-and-dirty answers on the question, mostly variations on the same answer. I don't usually mind that kind of thing, since FGitW answers don't do as well as longer, better answers.

The problem is that unless I'm severely mistaken, every other answer is severely incorrect. All seven of them, completely wrong. Yeah, I'm a stickler on regex, but allowing something like  ...,.,,.,,..9 or even ... to pass as a number seems worthy of a downvote. But there are literally seven answers that would call that a legit numeric format, one of which is from a user with over 30k rep.

I don't like downvoting. Out of 1177 votes I've cast on SO, 2 have been downvotes. But in this case, especially on such a frequently-asked question, I feel like downvoting everyone unless they fix their answers.

Enough venting. Here's why I'm whining to Meta about it:

  • If I vote down 7 competing answers on the same question, will I get flagged for vote abuse?
  • At what point does "sorta works" become worthy of a downvote? If it were a typo or something, I'd edit it or let it slide. Even an honest attempt that didn't quite work might get by with just a comment. Where's the line between "close enough" and "this answer sucks"?
  • You've seen the question. Am I right that these answers deserve downvotes? Seven people thought that [0-9,.]+ was "good enough" to match numbers, so why am I the only one who doesn't?
share|improve this question
You're advocating using a monster RE that causes brain failure in most readers? It's enough to make me think that Jamie Zawinski was right! – Donal Fellows May 7 '11 at 7:18
@Donal - My answer is probably overkill. I wanted to be super thorough if I was considering voting down everybody else. My main point is that something like [0-9.,]+ is nowhere near good enough. – Justin Morgan May 7 '11 at 12:31
Yeah; that's one that's worth voting down. Some of the others were better though. – Donal Fellows May 7 '11 at 12:37
@Donal I agree. Only two downvotes there are from me, actually. There were a lot of answers that got removed last night, nearly all variations on [0-9.,]+. – Justin Morgan May 7 '11 at 12:52
I think we're in agreement that [0-9.,]+ wasn't a solution. :-) – Donal Fellows May 7 '11 at 17:05
I would not be so hesitant of a downvote. Although the vast majority of us cast much mure upvotes than downvotes, the latter are also needed. It's not that expensive to downvote every now and then. – Aleadam May 7 '11 at 23:16
Down voting is a responsibility! If you don't point out the really bad stuff, you're indirectly contributing to it. Make people think twice before posting half-answers and code that will never work. – Wesley Murch May 7 '11 at 23:25
@Justin I fear you now :P As I'm learning regex myself, would you please review this answer I wrote? stackoverflow.com/questions/5958665/… Please, feel free to edit it/downvote me as necessary. – Aleadam May 11 '11 at 22:53
@Aleadam - Looks like a decent answer, but the question itself isn't all that clear. No need to fear me, I'm not such a huge stickler unless answers are so bad they're downright harmful. – Justin Morgan May 12 '11 at 1:55
@Justin Of course that was just a joke. Thanks again for taking the time to look at it. – Aleadam May 12 '11 at 2:04

1 Answer 1

up vote 32 down vote accepted

I don't like downvoting.

Get over it. This scenario is more common than you realize, and will continue to be so long as the folks who do know how to differentiate "correct" from "incorrect" withhold their votes.

Seven people thought that [0-9,.]+ was "good enough" to match numbers, so why am I the only one who doesn't?

One of two options:

  1. You're the only one who actually thought it through enough to realize how it could fail.
  2. You're wrong.

Fortunately, it's fairly easy to come up with a simple demonstration that will clearly indicate which of those options is applicable here. I recommend either including that in your answer (best option) or in comments on the many answers you'll be down-voting (meh...)

(Oh, and to address your other, lesser concerns: when it sorta doesn't work, not that I'm aware of, and test it!)

I got called away before having a chance to post this, but I did take a look at the question you use as an example, and most of the answers had a much bigger problem than simply being wrong: their authors had made no attempt to explain why this answer was preferable to one of the eight other answers. What's a poor reader supposed to do? Go through and test every single one? Figure out what it matches and what it doesn't, then decide on their own if that'll work for them?

Well, yes. Initially at least. Fortunately, regexs, especially short ones like these, are fairly easy to test. But once tested, it's important that readers - you included - go back and pick up the slack for the slacking authors: comment on what's matched and what isn't, down-vote what plain doesn't work.

Revisiting the question now, I see that several of the answers have been removed. Those are answers that future readers won't have to evaluate when searching for their solution. SO-style Q&A: 1, forum-style "everything clogs the tubes for eternity": 0.

share|improve this answer
As much as I love downvoting, +1. – user27414 May 7 '11 at 0:19
You're right. Looks like the signal:noise ratio improved quite a bit, and the asker managed to solve his problem. I guess this question took me by surprise since I'm not used to seeing that many severely flawed answers, and from people who should know better. I was afraid it was me. Anyway, I've put explanations of the other answers' problems in comments and my own answer. – Justin Morgan May 7 '11 at 4:13
Why are folks afraid of exercising their downvoting responsibility? I just can't comprehend it, I see people with 2000 votes and only 2-3 downvotes. It's crazy. – Wesley Murch May 7 '11 at 23:23
@Wesley - I've always taken a "safe, legal, and rare" approach to downvoting, and I always remove a downvote if people improve their answer. Having read this and other SO discussions on downvoting, I think I've been much more conservative with them than the majority. I may reevaluate my voting style. – Justin Morgan May 8 '11 at 14:01
@Justin Morgan: Down votes are here and they have their place and are quite necessary. There is a certain finesse involved I think, I always place a (hopefully) useful comment, and never write -1, it just makes people sour. Just remember that a down vote is not a personal attack or punishment. It's a way for the community to ensure that misinformation, laziness, and erroneous code gets pushed to the bottom. – Wesley Murch May 8 '11 at 14:06
"SO-style Q&A: 1, forum-style "everything clogs the tubes for eternity": 0." <== This – T.J. Crowder yesterday
I'd be interested to know the answer to "If I vote down 7 competing answers on the same question, will I get flagged for vote abuse?" I don't think I've ever thought seven answers on the same question needed downvoting, but I'm fairly certain I can remember four, possibly five. – T.J. Crowder yesterday
I don't think there's anything special about 7, @T.J.Crowder... I've seen questions that regularly attract the same wrong answer for years; presumably they'll eventually hit 7 wrong answers, and then more. It's not hard to imagine a FGITW situation where 7 wrong answers could be posted almost simultaneously; if that hasn't happened yet, then I assume it's only a matter of time. People email us about this from time to time, and we dutifully investigate; the instances where this is clearly malicious exist, but are vanishingly rare. – Shog9 yesterday
@Shog9: "the instances where this is clearly malicious exist, but are vanishingly rare" You mean someone downvoting all the answers on a question (either just to be malicious, or to try to make their own stand out)? If so, it's great news it's rare. (I've only seen every answer downvoted a few times -- and they were justified except on one or two occasions. :-) ) – T.J. Crowder 18 hours ago

You must log in to answer this question.

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