12 August 2010
Questions about the INSTR quiz of 11 August (1328)
A few players wrote with concerns about the INSTR quiz, which tested your knowledge of the impact of using a negative value for the POS argument to the function. Here we go: 1. "From my point of view today quiz is formulated ambiguously. None of the answers describes INSTR behavior really accurately. The _combination_ of the first and second answers does. For this reason I have selected no one of them, but I guess the other interpretation is possible as well in which case both of them shell be selected. It depends on how you interpret choices - as self-contained or as complimentary."
2. "Regarding today's question, I think two of the options can be a little incomplete, maybe misleading. This can be confusing, as it is not clear in the question if you meant "what is correct?" or "what is correct and complete?":
"Oracle searches for the NTH occurrence of the STR2 value backwards through STR1 (towards index position 1) - I didn't check this one, although I believe everything there is correct. But it fails to mention that is searches starting in position (length - POS)
"The search for STR2 begins from the end of STR1, instead of from the beginning. That is, a value for POS of -1 starts the search from the last character in STR1. A value for POS of -2 starts the search from the second-to-last character in STR1- I checked this one, and I think everything it says is correct. Still, to be *complete*, it probably had to mention that is searches backwards." My response: when I looked back over the choices for the quiz, I was surprised that I hadn't noticed when writing and reviewing the quiz how similar the two correct answers were. I generally try to avoid that, and make sure that each choice is more distinct. Having said that, I don't think there is actually any inaccuracy in either one - but I also agree that neither is a "complete" definition of INSTR. So let's address that: I do not claim in the assumptions or in this particular quiz that for a choice to be correct it has to describe completely a particular feature. Unless I state that in the particular question, all you should be concerned with is whether that choice itself is correct as a "self-contained" statement.