tag:blogger.com,1999:blog-8677649049588007585.post3946517907284598191..comments2023-06-18T16:15:22.432+01:00Comments on PL/SQL Challenge: Players don't like "execution section" in 19 November quiz (1663)Steven Feuersteinhttp://www.blogger.com/profile/16619706770920320550noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-8677649049588007585.post-16022522459371178192010-11-24T08:52:41.176+00:002010-11-24T08:52:41.176+00:00The worst thing about this matter is that it has n...The worst thing about this matter is that it has no practical value - it will not affect the quality of your code either you consider an exception s3ection as a part of an execution section or not.<br /><br />It resembles me a very old discuss how many angels may fit on to a needle tip.<br /><br />Regards,<br />Oleksandral0https://www.blogger.com/profile/15743792964167204705noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-22646452824793814812010-11-24T00:52:36.918+00:002010-11-24T00:52:36.918+00:00Oh my. What a mess I have made of things. Thanks f...Oh my. What a mess I have made of things. Thanks for pointing out that sentence, Scott. That is a TYPO. I meant to say:<br /><br />That is, the "BEGIN-END;" is simply shorthand for saying "The execution section starts with BEGIN and ends with END, unless there is an exception section, in which case the execution section ends with EXCEPTION".<br /><br />Argh....<br /><br />As for your example of a nested block that contains within its exception section a RETURN, I am not sure how to respond. You seem to be implying that whenever I talk about a PL/SQL block, I should state that it does not contain any nested blocks, or that the block under discussion is not a nested block but a top-level anonymous block...and I start to despair that it will be possible to pose quizzes against a common base of understanding about the language in which we code. I'll just have to "soldier" on....<br /><br />I thought this was a rather straightforward quiz, but then I've thought that way before....<br /><br />Your statement "I'm happy in a way you're standing your ground, it will help with consistency in the future - but I have seen you apply a correct response for all for less." was simultaneously encouraging and troubling. The troubling part is that on the one hand I agree that I have applied an adjustment for less - less vigorous debate, anyway. So why don't I apply a correction?<br /><br />Here's the thing: I look at the documentation, I "look" at how I have ever thought about, talked about and taught the structure of a block, and I simply don't see the ambiguity (and I am NOT accusing anyone of being unreasonable!). I don't think I can or should rescore when players say they have experienced ambiguity but I can't see the ambiguity in the code or supporting documentation.<br /><br />Well, thanks again to everyone for your patience, for your willingness to challenge me, for accepting my decisions....onward, PL/SQL developers!Steven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-52783601374798615172010-11-24T00:06:46.848+00:002010-11-24T00:06:46.848+00:00I'll start with - I'm not fussed over a re...I'll start with - I'm not fussed over a rescore or not. It's a game ;-)<br /><br />However, when reading through your thorough analysis, I was very surprised when you came to the conclusion that you won't be rescoring, particularly when considering this phrase:<br /><br />"The execution section starts with BEGIN and ends with END, unless there is an exception section, in which case the execution section ends with END".<br /><br />When I read the question, I found myself thinking "how could you do a return in the declaration section"<br /><br />I'm happy in a way you're standing your ground, it will help with consistency in the future - but I have seen you apply a correct response for all for less.<br /><br />So would this be considered as not having a return statement within the execution section?<br /><br />begin<br /> << inner_block >><br /> begin<br /> null;<br /> exception when others then<br /> return;<br /> end inner_block;<br />end anon; <br /><br />Keep up the good work, and retain that thick skin ;-)Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-71389331822876009902010-11-23T22:37:37.480+00:002010-11-23T22:37:37.480+00:00Sean, I very much appreciate your comment. As I wr...Sean, I very much appreciate your comment. As I wrote posts that used the term "reasonable" (and I used it more than once), I experienced a feeling of discomfort. I have been doing this long enough, that I should have recognized the warning signs and changed what/how I wrote.<br /><br />It is not very respectful to anyone (especially other software developers) to, in essence, accuse them of being unreasonable. Reason, rational thought, is at the very foundation of what we do.<br /><br />Clearly, a number of players felt there was ambiguity in my reference to "execution section." I should not, CAN not, dismiss that (even if I decide that I will not re-score :-) ). And if you experienced ambiguity, my seeming outright dismissal of ambiguity could seem like a slap in the face.<br /><br />So, dear PL/SQL Challenge players, I apologize if I offended any of you.Steven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-65444972342872634742010-11-23T22:06:06.293+00:002010-11-23T22:06:06.293+00:00With all due respect, I think I have to be contrar...With all due respect, I think I have to be contrary to one of the posts above, there very much are "REASONABLE" abiguities here. This is a case where there are two viable readings; each which leads to a different answer. The examples above are phrased to coincide with a particular reading, but they are equally valid if phrased according to the other reading too.<br /><br />I have the same 3 rooms in my house. I'm not in the bedroom. Where am I?<br /><br />I'm editting my pl/sql block. I'm somewhere that code can be executed. Where am I?<br /><br />The arguments above (on both sides) are cogent and well founded. But they are based on different assumptions. Neither assumption is inherently better or worse than the other. <br /><br />When discrepencies like this happen, the quiz maker gets to decide. Lucky for some, unfortunate for others, but in the grand scheme, little impact. As I said before, most of my errors are my own, not ambiguous questions. <br /><br />So, even though I'm on the bad-end of this discussion I'm not holding a grudge about scoring but I don't think it's fair to dismiss the counter argument as unreasonable.Seanhttps://www.blogger.com/profile/15790298349995376048noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-7562990645849607242010-11-23T15:44:05.249+00:002010-11-23T15:44:05.249+00:00Right. I believe that the only reasonable interpre...Right. I believe that the only reasonable interpretation of Oracle documentation is that these are three distinct sections, all defined within a larger "location" (the block as a whole).<br /><br />My home contains a study, bathroom and bedroom. I can be in any one of the rooms, but not more than one at once. <br /><br />Similarly, I can be editing my block, but while I am doing that, I am either in the declaration section, execution section or exception section.<br /><br />I cannot be in two at the same time.<br /><br />SFSteven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-31264422939052630892010-11-23T15:34:42.236+00:002010-11-23T15:34:42.236+00:00I understand you're not going to change your s...I understand you're not going to change your stance on this question, and I'm fine with that, but you make so many statements about there being three DISTINCT sections (Context tells us that by this you mean that these sections/parts/places in a PL/SQL block are completely exclusive of each other)...<br /><br />If you have to pick whether you are currently in your home city, in your home (BEGINS at your front door and ENDS at your back door), or in your study/office, which of these 3 DISTINCT places exclusively describe where you are? You must not be in more than one of these places at the same time, because a more specifically defined place cannot exist with a more generally defined place...Ryanhttps://www.blogger.com/profile/01933879578495746805noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-47810104308898566892010-11-23T08:00:51.376+00:002010-11-23T08:00:51.376+00:00I don't usually have strong feelings about the...I don't usually have strong feelings about the quiz since it is just a bit of fun, but I have to agree with pierre^ and Jeff Kemp. I interpreted "execution section" as "not declaration section".<br />Anyway, "bygones".<br />With regard to infeasibly quick answers, I can envisage a situation where someone is pushed for time and just luckily randomly ticks a box or two before rushing off to their meeting.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-3758786783921977292010-11-22T21:43:00.589+00:002010-11-22T21:43:00.589+00:00Hi,
I'm one of the players who read the questi...Hi,<br />I'm one of the players who read the question... read it again... and again... and then gave some answer - because in my understanding executable part include exception handling as it include the logic usually. And I felt that I don't care about the points... but still this question was very unclear for me...EasyK8shttps://www.blogger.com/profile/01760274616166519433noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-10379261336607925712010-11-21T19:57:42.197+00:002010-11-21T19:57:42.197+00:00jhall62, just to ensure that I am not misunderstoo...jhall62, just to ensure that I am not misunderstood...you write "By your own admission the literature on the subject has used "execution section" not only as you have used it but also to refer to everything between the BEGIN and END. This seems to be an unequivocal recognition of the ambiguity; however, you then deny that an ambiguity exists."<br /><br />That is NOT my admission. My "admission" is that the only possible way you could ever interpret the exception section as being part of the execution section is if by pointing to those occasional, parenthetical "BEGIN...END" phrases when mentioning the execution section.<br /><br />But - and I think I have been clear in this above - the only times you even see that much of an inference is directly in the context of a discussion of THREE, DISTINCT sections in a PL/SQL block.<br /><br />So what I am arguing, but I have clearly not been sufficiently clear about it, is that there is NO REASONABLE AMBIGUITY based on a reading of the Oracle documentation, my writings, discussions "out there" in the world, and so on.<br /><br />It's simply not the way a PL/SQL block is presented or how it is discussed.<br /><br />That's my conclusion from going over the doc, etc., in some detail. I have not seen anything from any of the writers above to contradict this, except to point to "BEGIN...END," the context of which I would argue clearly denies the ambiguity!<br /><br />Wow. This is fun or...no, I just got home from 10 hours of traveling back from Europe. I am deliriously happy to be here, and that is spilling over to the blog.<br /><br />:-)<br /><br />Yes, we will move on, and yes I will strive to avoid ambiguity and yes we will continue to experience moments like this, largely I would argue because of the ambiguities in Oracle documentation. I can't give definitions of everything I talk about in the quizzes - that would (a) give away lots of the answers and (b) create lengthy cumbersome quizzes.<br /><br />OK, time to ride my bicycle to visit my wife at Lill Street, an art center where she is displaying her jewelry.<br /><br />Fun chatting, as always!<br />StevenSteven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-12132524102880815082010-11-21T15:09:18.312+00:002010-11-21T15:09:18.312+00:00Definitely we can move on. Only a few are asking f...Definitely we can move on. Only a few are asking for a rescore. I think the responses are specifically because we DON'T expect to be tricked. So, when we read a question in a way that makes perfect sense to us, and "correctly" choose the answer for our reading, it's sort of a double penalty to be marked wrong. Particularly when we know the concept well enough that we would have gotten it right had it been worded differently.<br /><br />I do not envy your task of trying to find totally disambiguous phrasing for every question. And while I'm disappointed that I got a question wrong on a topic I do understand I don't think its inappropriate to point out wordings and the logic that follows from them to help in future questions.<br /><br />I will admit to swearing and hand waving when I didn't see 100% for my score, but I've missed far more questions simply because I mis-clicked than because I mis-understood. My lower scores are mostly my own failings.<br /><br />So, carry on, leave this one as is and move on; but I do hope some of our responses help the questions going forward.<br /><br />Thanks again!Seanhttps://www.blogger.com/profile/15790298349995376048noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-5775477449203904342010-11-21T15:07:14.453+00:002010-11-21T15:07:14.453+00:00There is a fundamental difference between using th...There is a fundamental difference between using the phrase "execution section” in talks or writings in contrast to its use in this quiz: talks and writings generally contain sufficient context to establish definition but in this quiz it is an isolated expression. Although you have routinely and consistently used this phrase in your writings (e.g., <i>Oracle PL/SQL Best Practices</i>), that does not establish context for this quiz. By your own admission the literature on the subject has used "execution section" not only as you have used it but also to refer to everything between the BEGIN and END. This seems to be an unequivocal recognition of the ambiguity; however, you then deny that an ambiguity exists.<br /><br />Concept questions can be difficult to address in the limited space of a quiz. Unlike quizzes in formal courses, the PL/SQL Challenge is not based on assigned material that establishes the definition of terms. Had I read the portion of <i>Oracle PL/SQL Best Practices</i> that discusses PL/SQL block structure immediately prior to taking this quiz, I would likely have read the quiz choice with your intended meaning; however, without that basis it was necessary to guess at your intent. I suspect that your difficulty accepting that the phrase is ambiguous is based on your past use of it when describing PL/SQL blocks.<br /><br />I don’t expect you to change your position, but hope you will avoid such ambiguity in future quizzes.jhall62https://www.blogger.com/profile/10339038131928463003noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-1111875229038074612010-11-21T13:59:45.191+00:002010-11-21T13:59:45.191+00:00> that leads players to be constantly suspiciou...> that leads players to be constantly suspicious<br />> that I might be trying to "trick" them<br />I'd put it more positive: you want us to read your questions very thoroughly :D<br /><br />I checked the answer in question because I compared it with other programming languages I know where the exception handling block is a sub-block auf the "execution" block.<br /><br />However, that would mean that a PL/SQL block should be defined as:<br /><br />[declare ...]<br />begin<br /> [exception<br /> ...<br /> end;]<br />end;<br /><br />So, regardless how it is defined in any other "modern" language in PL/SQL the opening of a new section obviously is also the closure of the previous section.<br /><br />Also, as Steven said, only because you can "execute" something within the exception-section, you're still in the section labeled with "exception" rather than the section labeled with "execute".<br /><br />Now I understand my misinterpretation, <br />let's move on!Captain Tripshttp://anonymous.com/noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-45899078905590881722010-11-21T06:39:30.832+00:002010-11-21T06:39:30.832+00:00I must say that I am surprised at this discussion....I must say that I am surprised at this discussion. First, I am sure you all know that I am ready, willing and able to admit I made a mistake and issue a correction. Second, I find myself wondering (at 6 AM on Sunday, as I get ready to head over to Terminal 3 and head home from my last trip of the year) if I have inadvertently cultivated an environment on the PL/SQL Challenge that leads players to be constantly suspicious that I might be trying to "trick" them. <br /><br />I say all of this because even after all these comments, and many by some of the higher scoring players and very serious PL/SQL developers, I simply cannot see the validity of your objections. In all my years working with PL/SQL, I have always talked about the three different sections of a PL/SQL block. It has always been presented by Oracle as three different parts or sections. I have never once in all this time ever heard anyone voice the opinion that the exception section is a part of the execution section (or executable part, if you will). The only justification for this position from the documentation is the occasional mention of "BEGIN-END;" as a description of the execution section of the block. Yet in all those instances that I could find, Oracle makes it quite clear that it considers the execution part to be different from the execution part. That is, the "BEGIN-END;" is simply shorthand for saying "The execution section starts with BEGIN and ends with END, unless there is an exception section, in which case the execution section ends with END".<br /><br />This perspective is, in fact and as I noted in my initial post, made explicit in the 11g documentation.<br /><br />I definitely cannot accept a % of wrong answers as an indication of ambiguity, as jhall62 suggest I should do. It's possible you are right, that many, many developers were confused by this - but how can we know? <br /><br />And as for arguments of common sense, well, I would argue first that common sense leads us clearly to a belief that the exception section is distinct from, not included within, the execution section. Then I would acknowledge that clearly "common sense" means different things to different people.<br /><br />Some of the arguments made to justify your interpretation of "exception section within execution section" are interesting, such as "having a return statement there implies a logical connection with the executable part of some other block." Yet such an interpretation is simply not supported, so far as I can tell, by any of the (sometimes fuzzy) verbiage in the documentation. That is, you can interpret all you want, and sometimes those interpretations will be helpful in how you view and build your code, but when it comes to an understanding of the different parts of a block, this is not a situation in which I find actual ambiguity, justifying a re-score.<br /><br />Shall we move on?Steven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-42570897239910614442010-11-21T01:26:23.623+00:002010-11-21T01:26:23.623+00:00I also wrestled with what is the concept of the qu...I also wrestled with what is the concept of the question? And (unfortunately) I finally decided, the question was can you use RETURN someplace other than where execution happens. Since I saw the possibility of ambiguity in my interpretation I then went to the documentation just in case. Since I couldn't find the phrase "execution section" I took that as confirmation I must have read it correctly. I didn't really even see the use of the word "part" until later; but then it was too late.Seanhttps://www.blogger.com/profile/15790298349995376048noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-42571667042201268912010-11-20T21:41:59.915+00:002010-11-20T21:41:59.915+00:00I'm also not convinced by the exclusion of the...I'm also not convinced by the exclusion of the exception section from the 'executable' section, but it does match the those extracts from the documentation, so I'll concede.<br /><br />I think the mental hurdle comes from trying to match the BEGIN to the END. If we think EXECUTE rather than BEGIN, then it follows better, and we match the END to include the declaration section too. That is cleaner as, with a named block, the label you should use in the END statement is the one in the PROCEDURE/FUNCTION or in the <<>> preceding the DECLARE.SydOraclehttps://www.blogger.com/profile/08828771074492585943noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-81683825410026182742010-11-20T19:16:24.106+00:002010-11-20T19:16:24.106+00:00I opt to see this from the angle of "what sho...I opt to see this from the angle of "what should not have happened". I believe that everybody can agree that "execution" translates into whatever the business is about. When something goes wrong with the business (or the data used by the business) we raise an exception. Oracle calls this an "exception" and I'm sure the business has an equivalent term.<br /><br />How do you all format your PL/SQL blocks?<br />I learned it this way, I agree with it, and all IDE'S I know of do too:<br />DECLARE<br /> -- this is what we need to work with<br />BEGIN<br /> -- make business happen<br />EXCEPTION<br /> -- something did not work<br />END;<br /><br />To me, this clearly identifies Execution and Exception as two distinct areas.<br /><br />I do not see how the wording of this quiz can be confusing. Rather, it uses common terms (one way or the other) that any PL/SQL developer should be familiar with.<br /><br />Above all, I do not believe that Steven is eager to trick anybody! Instead, common sense should prevail. If an issue occurs before the EXCEPTION, I would look to our business rules. If it happens after EXCEPTION, I would look to improve our error handling (after checking that the business rule is ok). Either way, I am looking at two very distinct areas of my program.<br /><br />MikeMikehttps://www.blogger.com/profile/04855911908563127732noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-55977451554323749002010-11-20T17:02:43.082+00:002010-11-20T17:02:43.082+00:00I am one of those players who spent some time figu...I am one of those players who spent some time figuring out if the exception handling part could be considered an execution section and eventually decided favorably. My reasoning was that: a) exception handlers are purposefully used to execute code, albeit in exceptional conditions; and b) one can declare anonymous blocks inside other blocks to have finer control over exceptions, and do so having into account the surrounding executable code.<br /><br />I understand the distinction between the declarative, executable, and exception handling parts, but I would argue that there is more to exception handling than just propagating exceptions (in conceptual terms), and, indeed, having a return statement there implies a logical connection with the executable part of some other block.António Ferreirahttp://www.di.fc.ul.pt/~asfenoreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-60050363528442535002010-11-20T16:43:57.651+00:002010-11-20T16:43:57.651+00:00The fact that only 51% of the participants respond...The fact that only 51% of the participants responded "correctly" to the "execution section" choice indicates that this choice is ambiguous (it seems unlikely that 49% of the respondents thought that the RETURN statement can appear in declarative code). While it is reasonable to expect that players would treat the phrases "execution part" and "execution section" as synonymous, it is equally reasonable to expect players to interpret the use of "execution section" as a deliberate attempt to express a concept of executable code that is more inclusive than Oracle’s use of "execution part." <i>Oracle® Database PL/SQL User's Guide and Reference 10g Release 2</i> consistently uses "execution part" to refer only to executable code that is not in the exception part, but never uses the phrase "execution section."<br /><br />In your post you state, "Yes, some parts of the documentation mention that the execution section is between BEGIN and END, but in all the paragraphs where that appears, Oracle also clearly distinguishes between the 'executable part' and the 'exception-handling part.'" Instead of supporting your argument that "execution section" and "execution part" should have been understood as synonymous, this statement demonstrates that the two phrases can have differing meanings.jhall62https://www.blogger.com/profile/10339038131928463003noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-27464732600010309792010-11-20T15:25:53.379+00:002010-11-20T15:25:53.379+00:00Hello Steven,
I am rather with Jeff - but believe...Hello Steven,<br /><br />I am rather with Jeff - but believe that the quiz badly needs rescoring. It was more about terminology juggling then about a real PL/SQL knowledge. Especially if take into account that this "executable section"/"exception section" separation is completely artificial and is not present in any other modern programming language that I know of (ADA is not modern).<br /><br />Regards,<br />Oleksandral0https://www.blogger.com/profile/15743792964167204705noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-8204495762856780042010-11-20T12:57:05.284+00:002010-11-20T12:57:05.284+00:00Hi Steven,
I don't envy you.
In its courses ...Hi Steven,<br /><br />I don't envy you.<br /><br />In its courses Oracle is unambiguous: the exception section is separate from the executable section.<br /><br />Regards,<br />PietPiethttps://www.blogger.com/profile/16038735462554268232noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-70142522937367482532010-11-20T10:23:59.019+00:002010-11-20T10:23:59.019+00:00I agree with Jeff Kemp. Declaration section first ...I agree with Jeff Kemp. Declaration section first and foremost allocates memory and, well, declares (something), some execution as a result of "default" values is merely a nice bonus to this; the exception handler executes code and thus, by common sense, is subpart of execution section.<br /><br />Well, common sense - we shouldn't count on it, I guess. ;-)<br /><br />It would be nice if future quizzes wouldn't rely on such loose terms.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-23599593813964758722010-11-20T09:51:03.549+00:002010-11-20T09:51:03.549+00:00I'd like to post about the 2nd question rather...I'd like to post about the 2nd question rather. I don't see the proof in the code since the 'no_return' function does include at least a RETURN statement...<br />Thanks<br />AnneAnnenoreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-38819236797745438382010-11-20T08:35:20.834+00:002010-11-20T08:35:20.834+00:00And while I understand your reasoning, Jeff, I don...And while I understand your reasoning, Jeff, I don't think it is supported by the way Oracle presents the sections of a block.<br /><br />Couldn't you also extend your reasoning to conclude that the declaration section is also an "execution section", since if a declaration specified a default, that code will be "executed"?Steven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-29358651633709240062010-11-20T08:27:32.698+00:002010-11-20T08:27:32.698+00:00I don't want a rescore, but I disagree with th...I don't want a rescore, but I disagree with the premise here.<br /><br />My understanding is a little more simple. A block has two parts: a part that has declarations, and a part that has executable code. The executable part may have an exception handler, but surely no-one would argue that it is not executable. If an exception is raised, the appropriate exception handler *will* be executed.<br /><br />To my mind, an exception handler is "an execution section", according to the straightforward meaning of those terms.Anonymousnoreply@blogger.com