Code review comment for lp:~marco-gallotta/ibid/uva

Revision history for this message
marcog (marco-gallotta) wrote :

> >> Maybe add a "uva set contest <contest_id>" then we can use that for
> >> the contest_id default.
> >
> > When does the bot decide to drop this default? Moving on when once the
> contest is over makes sense for countdown, but not necessarily for scoreboard.
>
> The contest_id is optional. So if you want the scoreboard for the
> non-current contest you will have to specify it.

We seem to be thinking along different paths. I'm thinking that the bot should determine the default contest_id as the current contest (if one is running), or the next upcoming contest. I thought your "set contest" option would be to temporarily override this default (e.g. if we know we're going to do this contest in 2 weeks time and don't care about the ones before then). My question was: if we do this, when do we discard the "set contest" default provided?

Example:

me: uva countdown
bot: <countdown for contest 42>
me: uva scoreboard
bot: <scoreboard for contest 41>
(contest 42 begins)
me: uva countdown
bot: <countdown for contest 42>
me: uva scoreboard
bot: <scoreboard for contest 42>
(contest 42 ends)
me: uva countdown
bot: <countdown for contest 43>
me: uva scoreboard
bot: <scoreboard for contest 42>

then...

me: uva set contest 45
me: uva countdown
bot: <countdown for contest 45>
me: uva scoreboard
bot: <scoreboard for contest 45 -- error>
(contest 45 begins)
me: uva countdown
bot: <countdown for contest 45>
me: uva scoreboard
bot: <scoreboard for contest 45 -- error>
(contest 45 ends)
me: uva countdown
bot: <countdown for contest 45> <-- this makes no sense!
me: uva scoreboard
bot: <scoreboard for contest 45> <-- but this does

or we could do:
(contest 45 ends)
me: uva countdown
bot: <countdown for contest 45>
me: uva scoreboard
bot: <scoreboard for contest 46> <-- the distinction is unexpected though

> Also is countdown the correct name for that function? It implies it
> will be doing some... counting down. "time left" is a better name.

It has aliases "remaining time" and "time remaining".

« Back to merge proposal