For now I set it up so that if there are no contenders, we append a winner rant with id=0 to winners.txt. This way we can recognize that there was no winner and display a message to say as much on the front end. The downside of this is appearances - it could be that the first thing greeting people to the page is a message essentially saying "no on uses this site". But even with the alternative listed below, I think that'd be pretty easy to surmise, it might just take 5 seconds longer.
The alternative is we don't append anything to winners.txt, we just get the latest winner, and display that on the front end. But this seems a little awkward to me. If we do this there are a lot of strange things that could happen:
The obvious one, a rant could persist as winner of a level for several iterations
A dead rant could be displayed as the winner
A rant could be displayed as the winner of multiple levels at the same time
For now I set it up so that if there are no contenders, we append a winner rant with id=0 to winners.txt. This way we can recognize that there was no winner and display a message to say as much on the front end. The downside of this is appearances - it could be that the first thing greeting people to the page is a message essentially saying "no on uses this site". But even with the alternative listed below, I think that'd be pretty easy to surmise, it might just take 5 seconds longer.
The alternative is we don't append anything to winners.txt, we just get the latest winner, and display that on the front end. But this seems a little awkward to me. If we do this there are a lot of strange things that could happen: