I think I have found a small error in the vote display code for the electorship, most likely due to the same mechanics that prevent the showing of negative votes (which has already been established to be )

Anyway, pictures are worth a thousand words, right?

enter image description here

enter image description here

One would expect the vote total to display 0, rather than +1, yes? I realize this could be as well, but thought I'd mention this odd behavior anyway.

The same thing happens in reverse - candidates you have voted down have a minimum of -1, instead of 0.

  • I see the same behavior.
    – Brant
    Aug 17, 2011 at 16:06
  • 1
    It sounds like it may be ceil/floor'ing to 0 and then applying the weight of the viewer's vote. Weird Aug 17, 2011 at 17:57
  • I think it's something like (scoreBeforeVote + abs(scoreBeforeVote))/2 + vote and S-BD. Aug 17, 2011 at 18:44
  • @Matthew - why would it be anything so complicated?
    – ChrisF
    Aug 18, 2011 at 10:54
  • @ChrisF It's effectively the same as score = total < 0 ? 0 + vote : total but I wanted to express it without a conditional because I'm a math nerd. :P Aug 18, 2011 at 15:11
  • @Matthew - now I've looked again it's obvious, but I thought there was something more complicated going on.
    – ChrisF
    Aug 18, 2011 at 15:26

1 Answer 1


Dave has the correct answer here - if the candidate has < 0 total score we show 0 and then apply the weight of the viewer's vote.

You must log in to answer this question.

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