Prev: Direct Client Needs : 10 Java with strong exp on JMS in North Carolina
Next: Searching tool to find a certain class in all available *.jars
From: Lew on 26 Jul 2010 17:25 Daniel Pitts wrote: > 2. All characters in the string are \0. (Empty string is the trivial > case of this) > Empty string is also the trivial case for a string wherein no characters in the string are equal to \0. -- Lew
From: Daniel Pitts on 26 Jul 2010 20:01 On 7/26/2010 2:25 PM, Lew wrote: > Daniel Pitts wrote: >> 2. All characters in the string are \0. (Empty string is the trivial >> case of this) >> > > Empty string is also the trivial case for a string wherein no > characters in the string are equal to \0. Are you trying to pick a fight? We're talking about hashCode() returning zero, I was showing how case 1, the empty string, was a trivial version of case 2. -- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
From: Lew on 26 Jul 2010 20:54 Daniel Pitts wrote: >>> 2. All characters in the string are \0. (Empty string is the trivial >>> case of this) Lew wrote: >> Empty string is also the trivial case for a string wherein no >> characters in the string are equal to \0. Daniel Pitts wrote: > Are you trying to pick a fight? Huh? > We're talking about hashCode() returning zero, I was showing how case 1, > the empty string, was a trivial version of case 2. If there are no characters in the string, it's a trivial version of a string whose hash code is 0 and all of whose individual characters, of which there are none, either is or is not equal to any given value. It's a simple statement of fact. Your statement seemed to imply that there was a '\0' hidden in there somewhere, so for the sake of, say, former C programmers I provided clarification. It's all about providing accurate information. -- Lew
From: Peter Duniho on 26 Jul 2010 22:52 Lew wrote: > Daniel Pitts wrote: >>>> 2. All characters in the string are \0. (Empty string is the trivial >>>> case of this) > > Lew wrote: >>> Empty string is also the trivial case for a string wherein no >>> characters in the string are equal to \0. > > Daniel Pitts wrote: >> Are you trying to pick a fight? > > Huh? > >> We're talking about hashCode() returning zero, I was showing how case 1, >> the empty string, was a trivial version of case 2. > > If there are no characters in the string, it's a trivial version of a > string whose hash code is 0 and all of whose individual characters, of > which there are none, either is or is not equal to any given value. > It's a simple statement of fact. Your statement seemed to imply that > there was a '\0' hidden in there somewhere, so for the sake of, say, > former C programmers I provided clarification. It's all about providing > accurate information. For what it's worth, I understood Daniel's statement just fine. It didn't imply anything about a hidden '\0'. It was just a variant on the usual mathematical approach to degenerate cases: for statements of "all", the empty set satisfies the condition as well as a non-empty set for which each member satisfies the condition. Which, oddly enough, could be a description of the statement you made in reply to his. For future reference, if you actually want to "provide clarification", you might consider instead of making a statement completely irrelevant to the question (strings where no characters are \0 are not in and of themselves specific to the question of the hash code being 0), state clearly the _actual_ clarification you desire to convey. Pete
From: Lew on 26 Jul 2010 23:33
Lew wrote: >> If there are no characters in the string, it's a trivial version of a >> string whose hash code is 0 and all of whose individual characters, of >> which there are none, either is or is not equal to any given value. >> It's a simple statement of fact. Your statement seemed to imply that >> there was a '\0' hidden in there somewhere, so for the sake of, say, >> former C programmers I provided clarification. It's all about >> providing accurate information. Peter Duniho wrote: > For what it's worth, I understood Daniel's statement just fine. It On the other hand, you are an experienced and skilled Java programmer. Others might've been fooled by the seeming ambiguity of Daniel's statement. Not, of course, you. The seed I dropped grew into a mighty tree of explanation thanks to your and Daniel's eagerness to do battle, resulting in continuing paroxysms of explanation. > didn't imply anything about a hidden '\0'. It was just a variant on the > usual mathematical approach to degenerate cases: for statements of > "all", the empty set satisfies the condition as well as a non-empty set > for which each member satisfies the condition. > > Which, oddly enough, could be a description of the statement you made in > reply to his. Ah, you got the point. Good. > For future reference, if you actually want to "provide clarification", > you might consider instead of making a statement completely irrelevant > to the question (strings where no characters are \0 are not in and of > themselves specific to the question of the hash code being 0), state > clearly the _actual_ clarification you desire to convey. I am perfectly satisfied with how it worked out, but thank you so much for the surely well-meant advice. -- Lew |