in reply to Amazing coincidence.

The list looks a lot like the top of Saints in our Book, with a few exceptions.

It must be a glitch in The Matrix :)

Replies are listed 'Best First'.
Re^2: Amazing coincidence.
by BrowserUk (Patriarch) on Aug 28, 2011 at 15:25 UTC
    The list looks a lot like the top of Saints in our Book,

    That was my first thought until I noticed the absence of Abigail-II.

    Now he hasn't been around for a couple of years, which (I think) is longer than anyone else on the list. That suggests that the time threshold in the query that fetches the list of users that have been active in the last few minutes, has been screwed up.

    Perhaps a limit that should have been set in minutes has been set in seconds? Or similar.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Great diagnosis!

      In fact, it was this small change that broke all node sets that were user lists and should reflect the "recent" users:

      Originally, there was this query, which did not use an index on lasttime:

      SELECT node_id pick_id, title pickname, node_id auth_id, title authname, experience rep FROM node, user WHERE node_id = user_id AND (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(lasttime +) < ?) ORDER BY experience $args{order}, node_id ASC LIMIT $limit

      I eliminated the function on lasttime by converting the date math from math on integers/unix timestamps to math on datetime types:

      SELECT node_id pick_id, title pickname, node_id auth_id, title authname, experience rep FROM node, user WHERE node_id = user_id AND lasttime > date_sub(NOW(), INTERVAL ? DAY) ORDER BY experience $args{order}, node_id ASC LIMIT $limit

      which now used days where it should have used seconds:

      SELECT node_id pick_id, title pickname, node_id auth_id, title authname, experience rep FROM node, user WHERE node_id = user_id AND lasttime > date_sub(NOW(), INTERVAL ? SECOND) ORDER BY experience $args{order}, node_id ASC LIMIT $limit

      As my excuse, there was a similar-yet-different code path further above, where the same parameters were used for non-user nodes that were in days, instead of seconds :-)).

        Wow, good you were not programming the Doomsday Machine!

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re^2: Amazing coincidence.
by Anonymous Monk on Aug 28, 2011 at 15:18 UTC
    Or padding the stats?