Weekend challenge
J. Landman Gay
jacque at hyperactivesw.com
Mon Jul 1 13:46:37 EDT 2013
On 7/1/13 12:53 AM, Geoff Canyon wrote:
> Okay, this is a beast, and in no way good or generalized. It doesn't use
> the previous function, instead just going through line by line and flagging
> all the issues it sees in one pass.
<snip>
Thanks Geoff, I'll definitely look it over. I actually won't have to use
it though because I was excused from the exercise, the server is doing
it instead. But it bugged me that I couldn't write a nice, neat handler
to do it.
The backstory: The client wanted a data verification check performed on
both the server and in the LiveCode stacks. I spent a weekend toiling
over this, I probably wrote six or eight different versions using
different methods. I never did produce anything neat and compact, so the
next Monday I asked the server person how they did it. They replied with
a four or five line algorithm which was very close to one of my initial
attempts, but they didn't have to do any duplicate checking. Apparently
there's a way in Rails to do that easily. They were bouncing arrays
around. A couple of my attempts used arrays but looping through all the
sub-keys wasn't any easier than just looping through the list.
I was feeling kind of miffed that they were able to produce a workable
script in a couple of hours and I'd been messing with it for days.
Fortunately the client said never mind, they would just use the one on
the server, and that I should move on to other things.
I was not disappointed, but it did leave me feeling kind of stupid (and
a little defensive about LiveCode.) I was relieved that no one here
jumped in to say "oh, just do this". But I still wonder if I was missing
some cool trick.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list