[TIC: Tongue in Cheek] Re: IDE oddities (was Re: Error Messages Are Evil)

Alex Tweedly alex at tweedly.net
Thu May 15 18:23:15 EDT 2014


On 15/05/2014 21:29, Richard Gaskin wrote:
>
> As an example of this workflow in action, we have a simple fix here:
> <http://quality.runrev.com/show_bug.cgi?id=11493>
>
> Since the code change is comprised of adding only five characters to a 
> comparison string and can be easily seen in the Message Box, no unit 
> test is required for that one.
>
I confess I have not read the guidelines on making code contributions, 
so I don't know which step includes code review by general onlookers - 
so here's a quick code review of this change.

The proposed change is summarized as:
> Currently:
>     if the platform is "MacOS" then
>
> Should be:
>     if the platform is in "MacOSLinux" then
I'd regard that change as unsafe for the following reason.

Currently Apple have reached version 10 (i.e. "X") of MacOS, and version 
7 of IOS. I suspect these may merge in the future, and be named either 
simply "OS" or something like that. Now, given enough years, the version 
number will reach 50, i.e. in Roman numerals, "L" - and so be called 
"OSL". This could result in a false positive in the above test, since 
OSL is a substring spread across what are really two distinct parts of 
"MacOSLinux".

I'd therefore propose that this test should be something more like
    if the platform is among the items of "MacOS,Linux" then

However - I've not actually tested that, nor checked whether the itemDel 
can be safely assumed at that point in the script - so you should 
probably ignore this suggestion :-)

-- Alex.




More information about the use-livecode mailing list