tag:blogger.com,1999:blog-8677649049588007585.post8033562187205424510..comments2023-06-18T16:15:22.432+01:00Comments on PL/SQL Challenge: Conflict between documentation on overloading - and reality (2143)Steven Feuersteinhttp://www.blogger.com/profile/16619706770920320550noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-8677649049588007585.post-66593745239220100992011-04-01T08:00:29.011+01:002011-04-01T08:00:29.011+01:00It is like the TO_CHAR problem of a month. When I ...It is like the TO_CHAR problem of a month. When I was checking the answer, because I could not believe it is such a simple quiz, I found out that I had given the wrong answer. It took at least 15 minutes before I found out what was going wrong. And I consider it a bug in Oracle. But one you cannot change and worse, it is very important to know that this can happen.Wim de Langehttps://www.blogger.com/profile/05505341375827859005noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-69954251308767149892011-03-31T20:15:07.299+01:002011-03-31T20:15:07.299+01:00I totally agree with Steven. Knowing these things ...I totally agree with Steven. Knowing these things would definitely help and may be we can report them to Oracle.<br /><br />I am not sure if it can be considered as a bug but knowing this would certainly help us to avoid bugs in our own code.<br /><br />I look forward to more of these "tricky" quizzes in future :) And once again thanks to Steven and his team for giving us this opportunity to explore PL/SQL.<br /><br />Best regards,<br />RameshRameshhttps://www.blogger.com/profile/04557315341209397856noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-13870591032133907242011-03-31T19:11:54.197+01:002011-03-31T19:11:54.197+01:00The question was about a successful compilation, n...The question was about a successful compilation, not about a proper usage. So answers are scored correctly - and fairly. And we <b>do</b> need to remember such peculiarities - at least to be able to explain someone why his successfully compiled program cannot be called.<br /><br />Regards,<br />Oleksandral0https://www.blogger.com/profile/15743792964167204705noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-17300576985029357572011-03-31T16:31:11.027+01:002011-03-31T16:31:11.027+01:00Thanks, Anonymous, but let's face it: it doesn...Thanks, Anonymous, but let's face it: it doesn't matter how much time we spend on this...either it is useful or it isn't.<br /><br />Dan, I am very glad to hear you are teaching PL/SQL to hundreds of developers - I am sure they will benefit greatly from your knowledge.<br /><br />Regarding this quiz, I don't think it's a matter of the quiz being tricky. It's more a matter of PL/SQL being (at times) a tricky language.<br /><br />One of the objectives of the PL/SQL Challenge is to transfer the knowledge I've acquired about PL/SQL as I explored its nooks and crannies. Surely, you would agree that you now know something about PL/SQL that you did not previously?<br /><br />You wrote: "If something fails to give a compile error but is an incorrect use of the feature, it is a BUG in Oracle and should be viewed as such. These errors in the PL/SQL language should not logged in our memory as something that is required to keep in mind. If it is a wrong use of the feature, it is WRONG. Simply because it "works in certain cases" (in this case, with a named parameter list) and does not give the needed compilation error, it is not a situation that needs to be remembered."<br /><br />Hey, you don't have to remember it if you don't want to - but surely it is helpful to know that this can happen! My point was not that you ever should write overloading like this, only that you can run into some rather quirky scenarios if you happen to overload excessively or carelessly.<br /><br />You can consider this a bug in Oracle or not; the main thing is to be aware that this can happen. This awareness could help you either avoid a bug or identify the cause of the bug more quickly.<br /><br />To conclude, this quiz was not intended to trick and in fact (to my mind) offers an important piece of practical information for PL/SQL developers.<br /><br />I sure hope, Dan, that you continue to play the PL/SQL Challenge - and share your viewpoints with us.<br /><br />Regards, SFSteven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-2604529252589813232011-03-31T16:06:49.821+01:002011-03-31T16:06:49.821+01:00Hey Dan, settle down. I generally agree with your...Hey Dan, settle down. I generally agree with your point but let's give these guys a break. They come up with a quiz EVERY DAY and you're not paying a dime to play. Your complaint seems awfully angry given that this is a FREE service with FREE prizes. Chill out and try to be a little more constructive instead of "swaring to never take the quiz again".Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-67100629037108280762011-03-31T14:50:19.073+01:002011-03-31T14:50:19.073+01:00I feel I also need to mention that JUST LAST WEEK ...I feel I also need to mention that JUST LAST WEEK I gave a "Basics of PL/SQL" presentation to a few hundred people. I included some slides about overloading, so the Oracle requirements and constraints for utilizing the overloading feature were clearly in my mind. And I NEVER would have told the audience that "well, you can do code it this way, Oracle won't give you a compilation error, and it will certainly work sometimes, but not all the time". I think you get my point.<br /><br />Clearly a trick question and answer, and designed to trip up those of us who know what we're talking about (at least sometimes!).-Dan-https://www.blogger.com/profile/14232500880533270596noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-19795585424318303082011-03-31T14:45:38.074+01:002011-03-31T14:45:38.074+01:00Unfair quiz! Those of us who use overloading and ...Unfair quiz! Those of us who use overloading and know the right way to use it, would never remember that Oracle fails to give a compile error when it is used INCORRECTLY. Another one of your trick questions, which is totally irrelavent to the real world use of good PL/SQL programmers. As a long time "PL/SQL Challenger", these are the quizzes after which I sware I'll never do another one!<br /><br />If something fails to give a compile error but is an incorrect use of the feature, it is a BUG in Oracle and should be viewed as such. These errors in the PL/SQL language should not logged in our memory as something that is required to keep in mind. If it is a wrong use of the feature, it is WRONG. Simply because it "works in certain cases" (in this case, with a named paramter list) and does not give the needed compilation error, it is not a situation that needs to be remembered.<br /><br />I use a mix of positional and named parameter lists, all for very good reasons. I use overloading frequently. I would NEVER code a function or procedure that would work ONLY if the calling program used a named parameter list, and I know would fail if a positional parameter list were used.<br /><br />Perhaps I've misunderstood the point of the PL/SQL Challenge all along. So your goal is to have us professional PL/SQL programmers learn and know all the quirky, incorrect things that PL/SQL does, instead of learning new, perhaps obscure, features of PL/SQL?<br /><br />As you said in your own post, the Oracle documentation states clearly that the answer you marked as "correct" - simply because Oracle INCORRECTLY does not report the error - is flat out wrong. Since you obviously knew that, your quiz question was clearly designed to trip us up.<br /><br />So, what's your point??-Dan-https://www.blogger.com/profile/14232500880533270596noreply@blogger.com