30 June 2013

Are "abandoned" quizzes included in rankings analysis?

JasonC asks this question:

Occasionally, I'll start a quiz, and it's about a subject I have no knowledge of at all - I can't even make an educated guess.  So I just close the window and do something else.

So then I wondered if my non-start gets logged somewhere as null points, and a VERY long time ?

The reason for this is that I notice I nearly always complete the quiz quicker than the AVERAGE time, but slower than the MEAN time, which suggests to me that a few excessively long times are skewing the average - maybe these could be people failing to complete the quiz?  None of this really matters: I've no complaints about my scores (well, they're lower than I would like, but that's another story!) - I'm just curious.

Excellent question! I thought I knew the answer but decided to look at the code, anyway. The code always tells the truth. :-)

Here's what the code tells me:

   PROCEDURE submit_saved_answers (comp_event_id_in IN INTEGER)
      l_comp_event      qdb_comp_events%ROWTYPE
                           := one_comp_event (comp_event_id_in);
      l_competition     qdb_competitions%ROWTYPE;
      l_answer_closed   BOOLEAN DEFAULT FALSE;
      /* Assign an end date to all answers for which there is at 
           least one saved answer. */
      FOR rec
         IN (SELECT DISTINCT eva.compev_answer_id, eva.user_id
               FROM qdb_compev_answers eva, qdb_quiz_results qr
              WHERE     eva.compev_answer_id =
                    AND eva.comp_event_id = comp_event_id_in
                    AND eva.ended_on IS NULL)
         UPDATE qdb_compev_answers eva
            SET ended_on =
                   qdb_player_mgr.user_end_time (
          WHERE eva.compev_answer_id = rec.compev_answer_id;
      END LOOP;
   END submit_saved_answers;

Look, a comment! I proudly proclaim in my trainings that my code is self-documenting, requiring no comments. But I am glad I broke my pledge here.
Bottom line: in the current scheme of things at the PL/SQL Challenge, we will not automatically set an end time for your answer when the quiz consists of a single question. For multiple-question competitions like the playoff, we will automatically set an end time if you answered at least one of the questions.

There can still, however, be some very long answer times that will skew the average. I have tried to isolate those in at least some of our calculations, but may not have caught them all.


  1. Hello All,

    Nice :) :)

    Just a few advices for you, the young people :

    1. Steven, when you will reach my age, you will realize how useful
    comments can be :) :)

    For many years I also used *not* to add comments ...
    until I started to like them, "in small dozes" ...

    2. JasonC, when you will reach my age, you will try to make
    your best for achieving, however, an "educated guess",
    as still better than nothing ...

    By the way, before playing the Challenge I have never encountered
    such a term ...

    Second, you can always ask for a quiz result to be removed
    entirely from your scoring ( with zero points ).

    And, if we are already at the timing topic, then,
    I can only say that, unfortunately, many times a "less educated"
    guess can achieve a better score than an educated one :( :( :(

    So, I understand perfectly your "urge" to rather "close the window"...
    Many times I feel exactly the same ...

    Thanks a lot & Best Regards,

  2. Steven - thanks for the reply!

    Iudith - how do you know I haven't reached your age already ? ;)
    It is a shame if a quick random guess gets a good score, but I do the quiz mainly to learn, so I don't see the point in doing this. But of course, a good score is nice to get too :)

    And re comments, I always say the more the better. The code will tell you WHAT it's doing, but necessarily WHY.


  3. @Jason, you are right of course, though I don't think this is the case :) :)

    Just as an idea, it could be nice to know the age of the players, in addition to their countries, companies,
    and so on ... though, probably, not many will "volunteer" to disclose it ... if even the country was many times
    kept in such a secret ...
    I just wonder sometimes whether one player or another has about my own age, or half of it, or even less ...

    No problem, old people can also play, and there is something nice and encouraging
    in being able to prove it :) :)

    Thanks a lot & Best Regards,