05 August 2011

Is typing and running code a form of cheating?

I received this email from a player today:

Is it okay to use sqlplus at all while taking a quiz? I know reading oracle documentation is acceptable, and typing the quiz in sqlplus verbatim is not allowed, but are we allowed to test basic concepts in sqlplus at all? I have been assuming it is not allowed. For example, I wasn't sure if IS OF type returned true if the value of the variable was the type or if the variable was the type. The documentation isn't always clear. If I was allowed to use sqlplus, I would have tested out a few statements to verify the expected outcome of that statement. 

The answer is: it is perfectly all right to use SQL*Plus, Toad, SQL Developer, PL/SQL Developer, etc. to write and execute code to help you answer the quiz.

You should not (and, in fact, you should not be able to) copy and paste code from a quiz, and then simply execute it. But as I note, you should not be able to do this; most quizzes present code as an image. If the code is accessible for copying, then it is not (or, shall I say, should not be) a competitive quiz (rankings and prizes) and we don't really care if you copy and paste.

But if you want to take the time to type in a block of code (or more), then execute that code to see the results, please go right ahead. The most important objective of the PL/SQL Challenge is to improve your knowledge of PL/SQL (and SQL and APEX and....). I can think of few better ways to do this then to write code. 

You will, of course, be "penalized" for taking the time to write code; your score will be reduced by the extra time required to do so. But it is definitely not cheating.

04 August 2011

NLS Settings and Assumptions - Be Careful! (5187)

The 3 August quiz tested your knowledge of the way that Oracle performs implicit conversions, in particular in this block:
   n   NUMBER;
   n := '123.456' || 900;
   DBMS_OUTPUT.put_line ('X' || n || 'X');
We reported the correct answer as:
But several players wrote to say that when they tested our answers with the verification code, they received the following error:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
So did we score this quiz improperly? Another player offered an explanation:

Hi, stupid me... A quick test for yesterdays quiz resulted in "ORA-06502: PL/SQL: numeric or value error: character to number conversion error". And that's the answer I gave for the quiz. Today I received the results and it seems I got it wrong... Of course I got it wrong...I live not in America, so the NLS setting were not set accordingly. I know they are in the assumptions, but after 100 quizes of not needing them, they'll get out of your mind.

And that is precisely why the error was not raised in the verification code and why the quiz was scored correctly. The assumptions state that:

The following calls to DBMS_SESSION.SET_NLS define national settings in effect for a quiz, unless otherwise specified in the quiz. If your local environment uses different settings, you may execute these statements to ensure compatibility with behavior and output of executable code provided by the PL/SQL Challenge.


This player also offered the following suggestion:

Is it a good idea when asking a question depending to NLS settings, to repeat this in the question(So people who want to test it and not living in the US aren't disadvantaged)? Just an idea.

That is a good idea and we will strive to remember to do this.

03 August 2011

Public Profile Settings for Your PL/SQL Challenge Account

A player wrote to us today:

I completed every daily PL/SQL challenge (as well as every Weekly SQL quiz) in July, 2011. Yet I did not receive the Achievement, "All Quizzes Taken in July 2011 (PL/SQL Challenge)" on my profile. Yet I notice that others have received this achievement. Please rectify. (Note: I did not take any of the APEX or Logic quizzes.) Thanks; your site is great.

I checked his public profile and found that he had not enabled the display of achievements. Now his accomplishment is visible to anyone who checks out his profile. And that reminded me that I should remind all of you:

While you can register by providing the absolute minimum of information, we allow you to set up your profile so that you display your technical experience, professional achievements, recommendations to others, and more. You also have complete control over what information is displayed and what is not.

I strongly encourage you to take a few minutes to visit your Account page, enter this information, and then click on the Public Profile Settings to ensure that others can what you have entered:

You can then decide which of the information from your profile you want to make public:

01 August 2011

New Oracle Magazine Quiz Starts Today!

Today marks the start of a new quiz at the PL/SQL Challenge: the Oracle Magazine PL/SQL quiz. I write a column for Oracle Magazine and two issues ago, I started a series of articles that introduce PL/SQL to those who are just entering the world of the Oracle Database.

And starting with the Sept/Oct 2011 issue, we are including quiz questions within the article, which can also be answered at the PL/SQL Challenge site.

Of course, you don't need to read the article to take the quiz, but we hope you will do so.

One player has already submitted a question about this quiz, asking: "The Oracle Magazine quiz ends in 1613 days? Seriously?"

Yes, seriously.  Each issue of Oracle Magazine has a "shelf life" of two-three months (before the next issue comes out), but the magazine is also available online. I know from experience that many Oracle technologists read these articles well into the future.

As a result, one way in which the Oracle Magazine PL/SQL quiz is different from others is that it will stay open for a really long time - until 31 December 2015.

But we will be selecting raffle winners randomly from all players, well before that, and likely more than once.

Steven Feuerstein