Weekend challenge

Richard Gaskin ambassador at fourthworld.com
Wed Jul 3 10:51:27 EDT 2013


Geoff Canyon wrote:
> The above code is just for the ID, but even on that task it doesn't seem to
> do the same thing I did. The above will not flag this as a problem, but my
> code would...

Earlier Jacque wrote:
> That was what I ended up with too for sequencing checks. Then they said
> something about "automatic duplicate checking" which Rails has and we
> don't. I had enough repeat loops to make me dizzy. Your one-pass script
> was better.

So it seems.

I would love to see that Ruby code. While it's possible that Ruby has 
some nifty function that's especially useful here, whatever it is it 
isn't magic; regardless of language, computers are too stupid to count 
past 1, so the algorithms for such data manipulation can only be 
optimized so much.

This reminds me of the RB vs Rev thread started here years ago by an 
ardent RB fan with an xtalk grudge, only to discover in the end that 
when it comes to string manipulation LC holds up very well against the 
best of them.  It's not always the fastest (though it was in that case 
<g>), but even when it's slower it's not by enough to matter much 
relative to the productivity gains of a typeless system.

I suspect, as it seems we're seeing here, that the Ruby code is "faster" 
only because it's cutting a lot of corners.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list