27 September 2010

24 September quiz prompts warnings from players (1403)

The 24 September quiz tested your awareness of string-indexed collections, and how you can use these to effectively change the sort order of the data in one's collection. Two players wrote regarding this quiz as follows: Daniel: "The solutions only work in very specific scenarios. If the text value was to be repeated, ie: 2 Michael Jordan entries, then only one of them would be displayed. So I don't think that solutions provided, other than the Insert/Select are very safe when dealing with large data sets." Patrick: "I would suggest to add a big warning to one of the answers of the question of 24-Sep. I know that the answer creating a table on the fly, inserting the data and selecting from there is syntactically correct, but I think it should almost never be used that way in a real program. The simple reason for that is that it's not multi user/session ready. If another use is currently using that function, a second user would get an error message when he tries to create the same table on the fly. Especially in web applications, most sessions are sharing the same database runtime users. I wanted to point that out, because many novice developers might take your examples as "facts" how a more complicated sort could be solved, but I think that answer needs a big warning that this is just a theoretical solution and should NOT be used in real world applications." Both Daniel and Patrick make good points (I have changed one of the answers to include Patrick's warning, in fact) and also make me realize how important it is for players to recognize that these quizzes will almost always be focused on particular features of the PL/SQL language. These features are inevitably presented outside the context of "real world" application development, in which many factors come into play. I will try to be better about including warnings in answers, when a theoretically correct solution could raise practical, real-world issues - but I also rely on and trust you, our devoted players, to let me know whenever you have a concern. Also, I am looking into how I can also present best practice oriented topics in the daily quiz in an unamibguous fashion ("best practices" inherently have a good does of subjectivity associated with them). If you have any thoughts about how I might do that, or specific ideas for quizzes, don't hesitate to let me know. I also plan to reorganize the blog so that it can be directly linked to the quizzes, allowing discussion of features and application of those features to be more visible to everyone playing the quiz. Cheers, Steven

2 comments:

  1. Over time, there have been numerous choices that fall in the category of what-not-to-do. Some have been commented on and others not. What is there to say about such choices? A few things come to mind:
    1. If you recognize it, good for you because it is proof of fundamental knowledge.
    2. If you don't, still good for you as you will learn something when reading the explanations.
    3. More than one best-practice answer for the same quiz would be asking a lot (too much in most cases).
    4. Only one true answer for each quiz would be boring and too easy for the really smart girls and guys.
    5. Every quiz needs a few choices and ones like "works maybe sometimes" are not really useful. Consequently, only TRUE or FALSE are valid answers. FALSE is easy to produce and mostly easy to spot. TRUE, even if the solution is undesirable, is a lot harder. Seasoned developers would never dream of doing it the way presented, but.... Hey, maybe it actually works. It makes everybody think and when you get it right (and didn't guess) you realize that you know the difference between good and bad. Basically, we are back to points 1. and 2.

    In the explanations given the day after, Steven sometimes use words to identify the good/best-practice choice. A possible way of high-lighting this could be a green smiley for best-practice (according to Steven) and a yellow smiley for every good, solid and absolutely valid choice. Red non-smileys go to the absolute do-not-do-this choices. Correctly selecting the green smiley choice could yield an extra 10 points. 5 points if all yellow smileys were selected and no extra points for the rest.

    The above could also help a little on the bad-day syndrome. I believe those mostly come down to selecting the best-practice choice without problems and then goofing up on one of the "weird ones".

    Mike

    ReplyDelete
  2. I very much like that idea, Mike, and have added it to our list of ERs. I am not so sure about giving extra points to selecting "preferred" choices, but definitely am "on board" with indicating which of the choices are recommended, which not.

    Many thanks, SF

    ReplyDelete