DROP PACKAGEwill drop both the package specification and body.
Several players complained that we marked this choice as correct :
DROP PACKAGE plch_pkg / DROP PACKAGE BODY plch_pkg /As one person wrote: "If you drop the a package and then try to drop the package body, you get the error ORA-04043: object PLCH_PKG does not exist. Answer 8571 is NOT correct."
One person even went so as to say: "I really don't like to have the solution DROP PACKAGE plch_pkg / DROP PACKAGE BODY plch_pkg / scored as correct. Yes the correct outcome is shown, BUT it is definitely bad style. And knowing that an error will pop up made me not choosing this answer, so I'm blamed again for good style. I know that you will not rescore the answer. But this kind of scoring makes me think to withdraw from the PL/SQL Challenge. So please harden your choices to support good style as well."
I must admit to being a little taken aback by these responses. Let's first address the "correctness" issue and then move on to what we should and should not include as correct choices in future quizzes.
This choice was marked correct because we asked this:
Which of the choices will result in the following two lines being displayed? [after calling a stored procedure that shows the status of the specified database object]
PACKAGE PLCH_PKG: UNDEFINED PACKAGE BODY PLCH_PKG: UNDEFINEDIt is, without doubt, true that if you run the two DROP statements above (a) those two lines of text will be displayed (so I don't see why a rescoring should be done), as both spec and body are gone, and (b) the second statement will result in Oracle throwing this error:
ORA-04043: object string does not exist Cause: An object name was specified that was not recognized by the system.Now, as noted above, the text will be displayed as required, so I do not think that any changes to the scoring should be performed.
But should I not include such choices in the quiz? And if I do, should I always mark them as incorrect because they are "bad code"?
Certainly, it needs to be very clear that the second statement is unnecessary and will throw the error. More generally, we should provide strong recommendations against using a certain approach if it is problematic in some way.
But never include choices like this marked as "correct"? I just don't see why we would exclude such things. There is usually some sort of lesson to be learned, some way to help you reflect on the way you do your work, and the kinds of traps you can fall into.
In this case, for example, I could see a developer who wasn't clear on the concept that DROP PACKAGE drops the body put such statements in their clean-up scripts. They might never have noticed that errors were being raised, because the end result met their requirements: packages all gone.
So they would in this case have marked that choice as correct, but then learned from reading the explanation that it is not necessary and should therefore be removed. Lesson learned.
What are your thoughts?