Re: Unexpected comparison behavior change in 4.5.1

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 48770
interpreted = N
texte = Thanks to Velma and Ken for their support on this... I really didn't intend to create a ruckus or delve into the deeper philosophy of empty string comparisons.My problem was solved before I posted to this list, as I coded around the inconsistency as soon as I isolated the problem. It's not for my benefit that I posted - it was primarilly as a clarification of the situation and to let other developers know about the problem so they would be forewarned of the change, since SMSI apparently didn't intend the behavior change, didn't know it had happened and therefore (understandably) didn't alert the developers.As for the derisive comments as to my sloppy coding practices and implications that it was my fault that my thoroughly tested and bug free long-standing code broke, these were not appreciated. When writing that code, I specifically tested to see what result WebDNA returned when testing for containment of an empty string.And this whole time, NOBODY has indicated that they had tried the code to verify that my experience is not unique, which is all I really asked for at the beginning.Can we put this to rest now, pending a response from Scott once he determines why the behavior changed and what behavior the product will exhibit in the future? I really don't even care which behavior SMSI chooses - I know now to never trust that particular behavior since I can't be sure what version of WebDNA my code may run on.Thanks, brian On Tuesday, March 18, 2003, at 09:53 AM, Velma Kahn wrote:> Hi Charles, > > bob contains an empty string just exactly as much as an empty string > contains an empty string. I thought Brian's explanation was good. I'm > not sure what you didn't understand about it. > > I also agree with Brian that of course the behavior should not be > changed without good reason and without notification in an upgrade. My > understanding from Phil's reply is that this was not an intentional > change, and they'll look into it. While in an ideal world software > would be bug-free, and software updates would not contain inadvertent > changes in behavior and new bugs, I haven't seen a software update yet > in my 20 years programming that didn't have some of those. Even the > biggest companies don't test adequately--because no one knows how to > test adequately. All of us release software to our clients with bugs, > and fix them when they're found. I'm hoping that Smith Micro will look > into it, and if the behavior was inadvertently changed, they'll change > it back in 4.5.2. This is tremendously inconvenient for someone in > Brian's situation, of course. He might do best to rewrite his code to > not use this particular algorithm. > > Velma > > At 12:26 PM 3/18/2003, you wrote: >> explain. >> >> - ck >> >> On Tuesday, March 18, 2003, at 12:25 PM, Velma Kahn wrote: >> >>> Brian is quite correct, as far as I can see. >>> Velma >>> >>> >>> At 12:21 PM 3/18/2003, you wrote: >>>> Brian, >>>> >>>> That is not correct. >>>> >>>> bob is a string consisting of the letters 'bob' it DOES contain 'b' >>>> (which is what the ^ means to WebDNA) it does not contain '' which >>>> is what [showif bob^] means as well as [if bob^]. Both these >>>> statements are FALSE. >>>> >>>> Someone correct me if I'm wrong please :) >>>> >>>> - Charles >>>> >>>> >>>> On Tuesday, March 18, 2003, at 10:29 AM, Brian Fries wrote: >>>> >>>>> Your description is inconclusive. If I was checking for b, then, >>>>> to paraphrase you: >>>>> >>>>> What your comparison is saying IF bob contains b then true. bob >>>>> contains bob therefore is false in both cases. >>>>> >>>>> This is not a test for equality, and bob contains NOTHING an >>>>> infinite number of times. >>>>> >>>>> Again, I'm not saying that one result is better than the other - >>>>> logically it's an inconclusive test. What I am saying is that, >>>>> since it's inconclusive, it SHOULD NOT HAVE BEEN CHANGED WITHOUT >>>>> GOOD REASON AND WITHOUT NOTIFYING DEVELOPERS THAT THEIR CODE MIGHT >>>>> BREAK. >>>>> >>>>> SMSI: Comments? Scott? Please? >>>>> >>>>> - brian >>>>> >>>>> On Tuesday, March 18, 2003, at 12:47 AM, Charles Kline wrote: >>>>> >>>>>> What your comparison is saying IF bob contains NOTHING then true. >>>>>> bob contains bob therefore is false in both cases. >>>>>> >>>>>> On Tuesday, March 18, 2003, at 01:56 AM, Brian Fries wrote: >>>>>> >>>>>>> On Monday, March 17, 2003, at 10:38 PM, Charles Kline wrote: >>>>>>> >>>>>>>> >>>>>>>> On Tuesday, March 18, 2003, at 01:32 AM, Brian Fries wrote: >>>>>>>> >>>>>>>>> [showif bob^] >>>>>>>>> >>>>>>>>> or >>>>>>>>> >>>>>>>>> [if bob^] >>>>>>>>> >>>>>>>>> >>>>>>>>> In my tests, these evaluate to true under 4.5.0 and earlier, >>>>>>>>> and to false under 4.5.1. Clearly URL is not the issue here. >>>>>>>> [showif bob^] should evaluate to 'false' so it seems the bug >>>>>>>> was in 4.5.0 >>>>>>> >>>>>>> And WHY should [showif bob^] evaluate false? I don't see >>>>>>> anything in the empty string that isn't also in bob, therefore >>>>>>> I - and every version of WebDNA prior to 4.5.1 - would expect it >>>>>>> to evaluate to > true. >>>>>>> >>>>>>>> >>>>>>>> [if bob^] should evaluate to 'false' as well. >>>>>>> >>>>>>> Again, why is false any better than true for this? If WebDNA >>>>>>> were being written from scratch, then it would be the right time >>>>>>> to make a choice on this. But, since it's worked the same way >>>>>>> since I began using the product in 1997, I think its a little >>>>>>> late to make this change. >>>>>>> >>>>>>> I'm not really here to debate which way it SHOULD resolve the >>>>>>> comparison, I'm only here to point out that it broke my code - >>>>>>> which was fully tested and had been working fine for years. >>>>>>> >>>>>>>> It was always my understanding that when using [if] to compare >>>>>>>> strings, they needed to be in quotes. Was in the docs. as that >>>>>>>> from the beginning. >>>>>>> >>>>>>> Relevance? What quotes do you see missing from my example? >>>>>>> >>>>>>> - brian ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Unexpected comparison behavior change in 4.5.1 (John Peacock 2003)
  2. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  3. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  4. Re: Unexpected comparison behavior change in 4.5.1 (Velma Kahn 2003)
  5. Re: Unexpected comparison behavior change in 4.5.1 (Clint Davis 2003)
  6. Re: Unexpected comparison behavior change in 4.5.1 (Clint Davis 2003)
  7. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  8. Re: Unexpected comparison behavior change in 4.5.1 (Velma Kahn 2003)
  9. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  10. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  11. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  12. Re: Unexpected comparison behavior change in 4.5.1 (Kenneth Grome 2003)
  13. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  14. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  15. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  16. Re: Unexpected comparison behavior change in 4.5.1 (Alain Russell 2003)
  17. Re: Unexpected comparison behavior change in 4.5.1 (Stuart Tremain 2003)
  18. Re: Unexpected comparison behavior change in 4.5.1 (Rob Marquardt 2003)
  19. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  20. Re: Unexpected comparison behavior change in 4.5.1 (Gary Krockover 2003)
  21. Re: Unexpected comparison behavior change in 4.5.1 (Alain Russell 2003)
  22. Re: Unexpected comparison behavior change in 4.5.1 (Tim Robinson 2003)
  23. Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
Thanks to Velma and Ken for their support on this... I really didn't intend to create a ruckus or delve into the deeper philosophy of empty string comparisons.My problem was solved before I posted to this list, as I coded around the inconsistency as soon as I isolated the problem. It's not for my benefit that I posted - it was primarilly as a clarification of the situation and to let other developers know about the problem so they would be forewarned of the change, since SMSI apparently didn't intend the behavior change, didn't know it had happened and therefore (understandably) didn't alert the developers.As for the derisive comments as to my sloppy coding practices and implications that it was my fault that my thoroughly tested and bug free long-standing code broke, these were not appreciated. When writing that code, I specifically tested to see what result WebDNA returned when testing for containment of an empty string.And this whole time, NOBODY has indicated that they had tried the code to verify that my experience is not unique, which is all I really asked for at the beginning.Can we put this to rest now, pending a response from Scott once he determines why the behavior changed and what behavior the product will exhibit in the future? I really don't even care which behavior SMSI chooses - I know now to never trust that particular behavior since I can't be sure what version of WebDNA my code may run on.Thanks, brian On Tuesday, March 18, 2003, at 09:53 AM, Velma Kahn wrote:> Hi Charles, > > bob contains an empty string just exactly as much as an empty string > contains an empty string. I thought Brian's explanation was good. I'm > not sure what you didn't understand about it. > > I also agree with Brian that of course the behavior should not be > changed without good reason and without notification in an upgrade. My > understanding from Phil's reply is that this was not an intentional > change, and they'll look into it. While in an ideal world software > would be bug-free, and software updates would not contain inadvertent > changes in behavior and new bugs, I haven't seen a software update yet > in my 20 years programming that didn't have some of those. Even the > biggest companies don't test adequately--because no one knows how to > test adequately. All of us release software to our clients with bugs, > and fix them when they're found. I'm hoping that Smith Micro will look > into it, and if the behavior was inadvertently changed, they'll change > it back in 4.5.2. This is tremendously inconvenient for someone in > Brian's situation, of course. He might do best to rewrite his code to > not use this particular algorithm. > > Velma > > At 12:26 PM 3/18/2003, you wrote: >> explain. >> >> - ck >> >> On Tuesday, March 18, 2003, at 12:25 PM, Velma Kahn wrote: >> >>> Brian is quite correct, as far as I can see. >>> Velma >>> >>> >>> At 12:21 PM 3/18/2003, you wrote: >>>> Brian, >>>> >>>> That is not correct. >>>> >>>> bob is a string consisting of the letters 'bob' it DOES contain 'b' >>>> (which is what the ^ means to WebDNA) it does not contain '' which >>>> is what [showif bob^] means as well as [if bob^]. Both these >>>> statements are FALSE. >>>> >>>> Someone correct me if I'm wrong please :) >>>> >>>> - Charles >>>> >>>> >>>> On Tuesday, March 18, 2003, at 10:29 AM, Brian Fries wrote: >>>> >>>>> Your description is inconclusive. If I was checking for b, then, >>>>> to paraphrase you: >>>>> >>>>> What your comparison is saying IF bob contains b then true. bob >>>>> contains bob therefore is false in both cases. >>>>> >>>>> This is not a test for equality, and bob contains NOTHING an >>>>> infinite number of times. >>>>> >>>>> Again, I'm not saying that one result is better than the other - >>>>> logically it's an inconclusive test. What I am saying is that, >>>>> since it's inconclusive, it SHOULD NOT HAVE BEEN CHANGED WITHOUT >>>>> GOOD REASON AND WITHOUT NOTIFYING DEVELOPERS THAT THEIR CODE MIGHT >>>>> BREAK. >>>>> >>>>> SMSI: Comments? Scott? Please? >>>>> >>>>> - brian >>>>> >>>>> On Tuesday, March 18, 2003, at 12:47 AM, Charles Kline wrote: >>>>> >>>>>> What your comparison is saying IF bob contains NOTHING then true. >>>>>> bob contains bob therefore is false in both cases. >>>>>> >>>>>> On Tuesday, March 18, 2003, at 01:56 AM, Brian Fries wrote: >>>>>> >>>>>>> On Monday, March 17, 2003, at 10:38 PM, Charles Kline wrote: >>>>>>> >>>>>>>> >>>>>>>> On Tuesday, March 18, 2003, at 01:32 AM, Brian Fries wrote: >>>>>>>> >>>>>>>>> [showif bob^] >>>>>>>>> >>>>>>>>> or >>>>>>>>> >>>>>>>>> [if bob^] >>>>>>>>> >>>>>>>>> >>>>>>>>> In my tests, these evaluate to true under 4.5.0 and earlier, >>>>>>>>> and to false under 4.5.1. Clearly URL is not the issue here. >>>>>>>> [showif bob^] should evaluate to 'false' so it seems the bug >>>>>>>> was in 4.5.0 >>>>>>> >>>>>>> And WHY should [showif bob^] evaluate false? I don't see >>>>>>> anything in the empty string that isn't also in bob, therefore >>>>>>> I - and every version of WebDNA prior to 4.5.1 - would expect it >>>>>>> to evaluate to > true. >>>>>>> >>>>>>>> >>>>>>>> [if bob^] should evaluate to 'false' as well. >>>>>>> >>>>>>> Again, why is false any better than true for this? If WebDNA >>>>>>> were being written from scratch, then it would be the right time >>>>>>> to make a choice on this. But, since it's worked the same way >>>>>>> since I began using the product in 1997, I think its a little >>>>>>> late to make this change. >>>>>>> >>>>>>> I'm not really here to debate which way it SHOULD resolve the >>>>>>> comparison, I'm only here to point out that it broke my code - >>>>>>> which was fully tested and had been working fine for years. >>>>>>> >>>>>>>> It was always my understanding that when using [if] to compare >>>>>>>> strings, they needed to be in quotes. Was in the docs. as that >>>>>>>> from the beginning. >>>>>>> >>>>>>> Relevance? What quotes do you see missing from my example? >>>>>>> >>>>>>> - brian ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

What am I missing (1997) Archives... (1997) Problem with Showif & Applescript (1997) how do ye do this?????? (2001) Bug Report, maybe (1997) unable to run webcatalog locally (1998) [ShowNext] (1997) changing order number (1998) Creating main- and sub-category search (1997) Secure server question (1997) Some Questions (1997) Handy Browser Counter Tip (1997) Calculating multiple shipping... (1997) FlushDatabase Suggestion (1998) MacActivity and PCS (1997) format search comparison Q (2000) Include a big block of text (1997) Webstar 1.3.1 PPC (1997) Base64 encryption limitations? (1999) user authentication via TCPSend (2005)