04 July 2012

Quiz for 4 July Will Not Be Ranked

The PL/SQL Challenge website has been down for most of the day, as we recover the database from 02:00 UTC 4 July. Our apologies for the inconvenience and lost opportunity to compete.

The results for 4 July will not be used in rankings and determining qualification in the Q3 championship playoff.

So if you are an American, it's just our way of saying: "Don't work (or 'play' with your technology)! Get away from your computer and celebrate the founding of your nation!"

Sigh.....

02 July 2012

Time for the Q2 2012 Championship Playoff!

The second quarter of 2012 ended last week...and that means it's time for the next championship playoff.

As you may recall, last quarter we initiated a new qualifier process in which selected players are asked to verify their performance during the quarter before being able to participate in the playoff.

I am very pleased to announce that none of the players this quarter will be required to take qualifier quizzes. What this means, in essence, is that none of the players submitted answers in astonishing and perhaps bewildering shorts amounts of time.

There is one other unusual aspect to the player group for this playoff: no players were able to qualify under the Wildcard category (see the FAQ for more information on how players are chosen).

In the table below, the number in parentheses after their names are the number of playoffs in which they have already participated. Congratulations to all listed on their accomplishment and best of luck in the upcoming competition!

We currently plan to hold the playoff on 26 July; that date may change if enough players are unable to play on that day.

Name Rank Qualification Country
Frank Schrader (7)1Top 25Germany
Stelios Vlasopoulos (3)2Top 25Belgium
mentzel.iudith (6)3Top 25Israel
Viacheslav Stepanov (5)4Top 25Russia
Justin Cave (5)5Top 25United States
Rakesh Dadhich (0)6Top 25India
Jerry Bull (4)7Top 25United States
kowido (5)8Top 25No Country Set
Siim Kask (6)9Top 25Estonia
Vincent Malgrat (2)10Top 25French Republic
Sebastian Kolski (1)11Top 25Poland
Anna Onishchuk (5)12Top 25Ireland
_tiki_4_ (2)13Top 25Germany
Ivan Blanarik (1)14Top 25Slovakia
Niels Hecker (7)15Top 25Germany
Chad Lee (4)16Top 25United States
james su (4)17Top 25Canada
Dieter Kowalski (1)18Top 25Germany
swart260 (0)19Top 25Netherlands
Scott Wesley (1)20Top 25Australia
Sean Stuber (4)21Top 25United States
Randy Gettman (6)22Top 25United States
Giedrius Deveikis (0)23Top 25Lithuania
Zoltan Fulop (1)24Top 25Hungary
Mike Pargeter (6)25Top 25United Kingdom
Kevan Gelling (5)26CorrectnessIsle of Man
Thierry Poels (3)63CorrectnessBelgium
Syed Ariful Bari (3)84CorrectnessBangladesh
Yuan Tschang (3)86CorrectnessUnited States
Vinu (0)90CorrectnessIndia
Goran Stefanović (1)100CorrectnessSerbia
anil_jha (0)105CorrectnessUnited States
Frank Schmitt (1)114CorrectnessGermany
John Rowbottom (1)200CorrectnessUnited Kingdom
Kuzmin Konstanin (0)224CorrectnessNo Country Set

30 June 2012

PL/SQL Challenge at Kscope12

I returned a few days ago from ODTUG's annual Kscope (formerly Kaleidoscope) conference, this year in hot, hot San Antonio, but located at the very comfortable and luxurious JW Marriott resort.

At the suggestion of Mike Brunstedt, one of our fabulous PL/SQL quiz reviewers, I made up a PL/SQL Challenger ribbon so that players and friends of the site could proudly proclaim their Challenger-ness:



We will also be giving them out at Oracle Open World in the Fall, so there's another reason to attend Larry's outsized celebration of all things Oracle.

It was great to meet players of the PL/SQL Challenge, and hear about how playing the quizzes has helped them in their work. It was even more of a pleasure to meet up with some of the reviewers who ensure the high quality of quizzes we play on the site:


From left to right: Michael Brunstedt, Patrick Barel, Steven Feuerstein, Kim Berg Hansen

The PL/SQL Challenge wouldn't exist at all without the initial support and ongoing efforts by my Application Express expert friends at Apex Evangelists, so I demanded that they also join me for a photo:


From left to right: Dimitri Gielis, John Scott, Steven Feuerstein, Paul Broughton

Kscope12 was the usual fantastic conference, organized oh-so-well by Kathleen McCasland and her posse of capable women from Your Conference Connection, led by a friendly, enthusiastic board of directors.

Hope to see you there next year!

22 June 2012

PL/SQL Bug Confirmed from 20 June Quiz

The 20th June quiz tested your knowledge of how to remove "gaps" from a sparse array (make it dense). Daniel Kennedy posted an objection to the scoring, saying that if you use a NULL value for the index value in the collection, then none of the choices are correct.

This was a big surprise to many of us, who have long seen in our code that the idex value in an integer-indexed array cannot be NULL. Well....after checking with Bryn Llewellyn, Oracle PL/SQL Product Manager, I confirmed that this was a bug - and one that had not yet been reported!

So Bryn filed a bug report (1422744) with the explanation and code shown below.

Many aspects of the PL/SQL Challenge make me proud (the large number of players, their dedication, the growing body of knowledge about PL/SQL accessible in formats never available before, and so on). But when we identify bugs in the language or fixes required in the documentation, then I feel even more strongly how much the PL/SQL language can benefit from an active, engaged community.

Thanks, Daniel, for identifying this bug and for playing the PL/SQL Challenge.

Steven Feuerstein

v(null) := 42 succeeds when v is an IBBI – and brings Heisenberg exception handling 
(from Bryn Llewellyn)

The testcase is copied below. Run it as any user with at least Create Session and Create Procedure.

The behavior of the varray and nested table tests is exactly as expected. Without the exception handling code, ORA-06502 is reported with a ORA-06512 for Line 9. And with the exception handling code, ORA-06502 is caught and nicely reported, and the program completes with no unhandled error.

However, IBBI_Test_1 runs without error and prints out 42. This is clearly a bug. Null is not a value. Rather, it's an indicator that expresses that the value is unknown.

Now it gets worse. IBBI_Test_2 simply adds the identical exception handler code for ORA-06502 around [v(null) := 42;] that Varray_Test_2 and Nested_Table_Test_2 use. But at run-time, we get this:
 
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: NULL index table key value
ORA-06512: at "USR.IBBI_TEST_2", line 13
ORA-06512: at line 1

And finally, it gets worse still. IBBI_Test_3 adds more exception handling code. This time around [a := v(null);]. At run time, ORA-06502 is now obligingly caught at both [ v(null) := 42; ] and [ a := v(null); ].

------ Testcase ------
 
alter session set Plsql_Warnings = 'Enable:All'
/
 
create procedure Varray_Test_1 authid Definer is
  type t is varray(10) of pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
  -- PL/SQL: numeric or value error: NULL index table key value
  ORA_06502 exception; pragma Exception_Init(ORA_06502, -06502);
begin
  v(null) := 42; -- Line 9
end Varray_Test_1;
/
begin Varray_Test_1(); end;
/
 
create procedure Varray_Test_2 authid Definer is
  type t is table of pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
  -- PL/SQL: numeric or value error: NULL index table key value
  ORA_06502 exception; pragma Exception_Init(ORA_06502, -06502);
begin
  begin
    v(null) := 42;
  exception when ORA_06502 then
    DBMS_Output.Put_Line('ORA-06502 on "v(null) := 42"');
  end;
end Varray_Test_2;
/
begin Varray_Test_2(); end;
/
 
create procedure Nested_Table_Test_1 authid Definer is
  type t is table of pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
  -- PL/SQL: numeric or value error: NULL index table key value
  ORA_06502 exception; pragma Exception_Init(ORA_06502, -06502);
begin
  v(null) := 42; -- Line 9
end Nested_Table_Test_1;
/
begin Nested_Table_Test_1(); end;
/
 
create procedure Nested_Table_Test_2 authid Definer is
  type t is table of pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
  -- PL/SQL: numeric or value error: NULL index table key value
  ORA_06502 exception; pragma Exception_Init(ORA_06502, -06502);
begin
  begin
    v(null) := 42;
  exception when ORA_06502 then
    DBMS_Output.Put_Line('ORA-06502 on "v(null) := 42"');
  end;
end Nested_Table_Test_2;
/
begin Nested_Table_Test_2(); end;
/
 
create procedure IBBI_Test_1 authid Definer is
  type t is table of pls_integer index by pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
begin
  v(null) := 42;
  a := v(null);
  DBMS_Output.Put_Line(a);
end IBBI_Test_1;
/
begin IBBI_Test_1(); end;
/
 
create procedure IBBI_Test_2 authid Definer is
  type t is table of pls_integer index by pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
  -- PL/SQL: numeric or value error: NULL index table key value
  ORA_06502 exception; pragma Exception_Init(ORA_06502, -06502);
begin
  begin
    v(null) := 42;
  exception when ORA_06502 then
    DBMS_Output.Put_Line(q'{ORA_06502 on "v(null) := 42"}');
  end; -- Line 13
  a := v(null);
  DBMS_Output.Put_Line(a);
end IBBI_Test_2;
/
begin IBBI_Test_2(); end;
/
 
create procedure IBBI_Test_3 authid Definer is
  type t is table of pls_integer index by pls_integer;
  v t;
  a pls_integer;
  n pls_integer;
  -- PL/SQL: numeric or value error: NULL index table key value
  ORA_06502 exception; pragma Exception_Init(ORA_06502, -06502);
begin
  begin
    v(null) := 42;
  exception when ORA_06502 then
    DBMS_Output.Put_Line(q'{ORA_06502 on "v(null) := 42"}');
  end;
  begin
    a := v(null);
  exception when ORA_06502 then
    DBMS_Output.Put_Line(q'{ORA_06502 on "a := v(null)"}');
  end;
  DBMS_Output.Put_Line(a);
end IBBI_Test_3;
/
begin IBBI_Test_3(); end;
/

19 June 2012

Big Mistake by Steven, No Quiz on Monday (for Many)

Dear PL/SQL Challenge Players,

I made a very big mistake today, and the result is that many of you could not play Monday's quiz.

I switched to maintenance mode at 15:00 to fix a bug, but then neglected to return to normal mode of play.

Then, seeing as I am in Taos, NM, I left the world of computers behind for Bandelier National Monument, an amazing place....but as a result, I did not notice that so many of you were notifying me of a problem with the site.

My deepest apologies. We will have to void the results for Monday's quiz.

I will change the site so that maintenance mode is always turned off after a period of time, so that if I happen to forget again, the site will correct itself.

Steven Feuerstein

15 June 2012

Gee Thanks, Amazon

Sure, Amazon Web Services are generally amazing and wonderful.

Except when they are not.

As you can read here, "parts of Amazon Web Services (AWS) suffered an outage on Thursday which led to a spread of high-profile sites clocking off the Web for the evening." Like the PL/SQL Challenge.

And 10 hours later, the PL/SAL Challenge site is still not available.

As a result, today's quiz will not be included in rankings for the quarterly championship.

My apologies to all players....

Steven Feuerstein

04 June 2012

Over 500,000 Answers Submitted on the PL/SQL Challenge!

Over the weekend of 2 June, we reached a major milestone on the PL/SQL Challenge: the 500,000th answer to a quiz was submitted!

Altogether, a total of 9,503 players from 120 countries have submitted (at the time of writing this post) 501,623 answers to quizzes. They used a total of 5770 days' time to decide on their choices and submit the answers.

Of course, the vast majority of those answers were submitted by a much smaller "core group" of Oracle technologists who play the daily PL/SQL quiz each day, or close to it.

Which means it's time for the Dedicated Players Roll Call. You will find below the list of all players who have missed no more than 50 daily PL/SQL quizzes out of the 559 that have been played since 8 April 2010. Now, that's dedication!

Dedicated Players Roll Call

PLAYER TAKEN MISSED
Martin_Scholz_Berlin_Berlin
558
1
Patrick Barel
558
1
poelger
555
4
John Hall
553
6
Rohan Gray
552
7
DaveStadt-wbt
550
9
Ralf Koelling
549
10
Niels Hecker
548
11
Sterol Andro
547
12
Sean Molloy
547
12
Mike Pargeter
543
16
Anatoliy Kanivets
542
17
Zoltán Pásztor
541
18
João Barreto
540
19
Cliff Nadler
540
19
Scott Wesley
539
20
Frank Schrader
538
21
Jeroen Rutte
537
22
emha
535
24
VictorD
533
26
Marc Thompson
533
26
Otto Palenicek
533
26
Martin Mierke
531
28
Jim Schmitz
531
28
Alexander Koblov
530
29
Kevin Bentley
530
29
Rich Dellheim
529
30
Ronald Sönksen
529
30
Justin Cave
529
30
Henry Abeska
528
31
Janis Baiza
528
31
EdgarsP
527
32
Natarajan-wbt
522
37
Wolfgang Habermann
521
38
Michal Cvan
521
38
Markus Zuser
521
38
Marcus Matzberger
520
39
Hellmaster
520
39
Ivan Blanarik
519
40
Thierry Poels
519
40
CLW-wbt
517
42
Chad Lee
516
43
Naresh Kumar
515
44
Jeff Kemp
514
45
David Codl
514
45
William (Yi) Zhu
512
47
Bartek Goldman
511
48
Jens Petersen
511
48
Oliver Dimalanta
511
48
Jeyhun Gasimov
510
49
GabrieleR
510
49
Rob van den Berg
510
49
Radoslav Golian
510
49
Xavier Descamps
510
49
Geert Guldentops
510
49
Wim de Lange
509
50
Milan Vontorcik
509
50