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.