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

Saw this banner pop in on a question I was viewing, found it interesting:

enter image description here

I think that if the result of new actions (say, 2 new answers and 2 answers have been deleted) yields a total of 0, the bar should say 2 new answers and not subtract the ones that have been deleted.

If the algorithm to determine the number is more complex than I envision, then when it yields 0 the bar should self-dismiss.

share|improve this question
3  
So this is primarily a plurals bug? –  Toomai Aug 16 '12 at 19:10
    
Maybe one got added and one got deleted... 1 - 1 = 0, although it should still say 1 new answer. –  ben is uǝq backwards Aug 16 '12 at 19:11
5  
No, @Toomai, I don't really care that it says "answer" vs. "answers"... –  Aaron Bertrand Aug 16 '12 at 19:12
    
I am curious on what happened when you clicked it –  ajax333221 Aug 16 '12 at 19:13
    
@Toomai, shouldn't that read a plurals bug?. –  ben is uǝq backwards Aug 16 '12 at 19:13
2  
@ajax333221 I am in fear of what may happen, so I haven't clicked it yet. –  Aaron Bertrand Aug 16 '12 at 19:14
    
I believe nothing can go that wrong if you click it, plus, I don't think it is useful to don't click it (at least no more useful than to see what happens if clicked). I would say to view page source and copy everything in case it is needed in a future and then click it :D –  ajax333221 Aug 16 '12 at 19:19
1  
@ajax I wasn't really in fear, I was kidding. But I don't think view source will help, it's not like the ajax or whatever that is used to pop in the live refresh information is going to be in the source. I loaded the question in a new tab and it still has 3 answers. So I guess it's possible that an answer was added and an answer was deleted, but I agree with Ben that it should still say there is a new answer. The live refresh bar shouldn't have to also keep track of deleted questions - when a question is deleted and nothing else has happened, I'm not informed, so they shouldn't "count"... –  Aaron Bertrand Aug 16 '12 at 19:23
    
Maybe someone added an answer, and then quickly self-deleted (when they saw a similar answer or whatever). Thus, the live-refresh event fires, but the total new answers is actually zero (still a bug, but a possible explanation for why it happened). –  jadarnel27 Aug 16 '12 at 19:29
    
@AaronBertrand How come you were not really in fear?! Don't click it, or a division by zero will wipe the whole SO database!!! Now, seriously: I don't know how this is implemented, but maybe it's two separate operations, one that identifies that the banner should be displayed (happened before answer was deleted), and a second one to actually issue the notification (after the answer was deleted). –  bfavaretto Aug 16 '12 at 19:31
3  
@jadarnel27 yes I'm sure it was something along those lines, and don't expect it's something that is very easy to reproduce. But whatever formula populates the number in that answer should have a floor of 1. If it's 0, the banner should disappear. :-) –  Aaron Bertrand Aug 16 '12 at 19:32
    
I saw that happen to me once before.... and just before I saw the "0", it did say "1 new answer", so I always assumed it was a self delete or an extremely fast mod –  psubsee2003 Aug 16 '12 at 19:33
2  
Every time I load this page, I try to click on your screenshot to dismiss the bar. –  jadarnel27 Aug 16 '12 at 19:43
1  
@jadarnel27 sorry. :-) –  Aaron Bertrand Aug 16 '12 at 19:46

2 Answers 2

up vote 7 down vote accepted

A zero answers count will no longer be displayed. I believe this was a race condition that you hit when two answers were removed - I hope you bought a lottery ticket on Aug 16th.

share|improve this answer

Clearly there is some timing issue going on in some cases where the decision to show the bar is not aware that there is no longer any reason to show the bar. (Or an action is reflected in the count that shouldn't be.)

Based on the down-vote I suspect that some people feel this isn't really a bug or is not important enough to fix. I still think the code surrounding the construction of the message that gets displayed in the bar could be investigated - when it's being looked at for other reasons - and improved such that 0 never shows up there.

It's not a big deal, but if the action that caused the bar to show up has been undone, there is no longer a reason for the bar to be there. And I don't think there is ever a reason to tell me explicitly that 0 actions have occurred.

share|improve this answer
1  
A down-vote really means a user doesn't think it is not so important to be fixed, not some people. :) –  kiamlaluno Aug 16 '12 at 19:54
    
@kiamlaluno Yeah that is just my most logical guess. I don't think anyone could disagree with my premise that "0 new answer" is a meaningless notification, or suggest that my question lacks research. Maybe it is not useful because it has never happened to them, or that if it did they would just shrug it off and ignore it anyway. –  Aaron Bertrand Aug 16 '12 at 19:58
    
Don't worry, this is certainly not the most pedantic bug report I've ever seen. I think you're fine in reporting this. –  jadarnel27 Aug 16 '12 at 20:01
    
@jadarnel27 25 up-votes, wow. –  Aaron Bertrand Aug 16 '12 at 20:05
1  
Well-played @jadarnel27. –  Tim Stone Aug 16 '12 at 20:18

You must log in to answer this question.

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