04 May 2011

Show minimum version before you see the quiz?

I just received this request from a player:

Would it be possible to show the "Minimum Oracle Version" for the before taking today's quiz?

As you probably know, I tend to be conservative about providing any information "in advance" that could give away crucial clues about the quiz.

Having said that, however, I am inclined to support the above idea. Basically, the idea here would be that many developers are not yet working with the latest versions of Oracle (in this case, 11g). Which puts you at a tremendous disadvantage when the clock starts ticking and then you are confronted with a version with which you do not have much, if any, familiarity.

And offering as an advance "clue" that we'll be working with 11g is a rather broad hint that doesn't really give away too much information.

Your thoughts?

SF

03 May 2011

When to use the NULL statement? Many objections raised! (2281)

The 2 May quiz question and multiple choices were brief and free of any code....so of course one would expect that the quiz would generate many responses from players. The question was: "Which of the following statements describe a reason to use the NULL statement in your program?" And the choices given were:

To allow a GOTO statement to transfer control to a label at the end of your subprogram (at which point there's nothing left to do).

To improve readability by making the meaning and action of conditional statements clear.

To create "placeholders" in your code, also known as "stubs", so that your code can compile even if you are not yet done.

To document that you have reached the end of your block and there is nothing more to do.

The first three were scored as correct, the last one as incorrect.  Rather than offer some of the various comments here, I will leave it to players to post their opinions (please do read the answer text before you do so). I will simply say this:

1. The correct choices were taken directly from the Oracle documentation.

2. I did not ask you to decide which choice was a good reason or a best practice regarding the NULL statement, simply a reason to use it.

3. You might not like GOTOs, you might think that a GOTO is a really bad idea and should never be used. But the fact is that it is a part of the PL/SQL language - and the PL/SQL development team doesn't implement constructs without a reason or legitimate use. You can say the same for the NULL statement.

So I do not plan to change the scoring on this quiz, but please do post your comments and we will go from there.

Finally, for those of you who vow to never to use a GOTO and claim to believe that there is never any reason to do so, please check out this analysis from Steve McConnell and Code Complete.