Is RR too easy? Or too hard? (was) Is RunRev marketed to

Peter Alcibiades palcibiades-first at yahoo.co.uk
Sat May 31 03:31:02 EDT 2008


One big gap in Rev as a general purpose environment seems to be getting data
out in a structured form.  Or maybe this is just personal ignorance in how
to do it?  If so, corrections would be welcome.

You have lets say a tab separated file with data in it.  This seems to be
the approved way of storing a few thousand or tens of thousands of records
of data, and indeed it does work fine for storage.  Now you want to produce
reports out of it.  The recommended way (which I've done) seems to be one
field per item of information, lay out the card so that it looks halfway
decent, and then print card. 

However any report is quite capable of having 50 -100 cells, more, in it. 
Now, it may be that there is an easier way, which if so it would be great to
hear about, but addressing all those cells individually in a script so you
go through the file and extract and calculate what is wanted is immensely
tedious, inflexible, lengthy and error prone. Also, your reports may well be
multiple pages, in which case layout again becomes problematic.  The card
metaphor does fine when you are dealing with screen fulls of info, but when
you're dealing with page fulls, less so.  Maybe there is a good way to lay
out a field with totals and subtotals and percentages in it, and that does
not involve addressing all the cells individually?  Even then however, in
Linux, I would have to re-export it to a text file at the moment in order to
format it properly for printing it.  (Yes, a bug has been filed on this.) 

Consequently in this, as in formatting a field for printing, your average
dinosaur sighs and reaches for awk (animals of more recent period will
probably reach for Perl), while reflecting that this is for at least this
purpose an incomplete environment.  Not only does it take a fraction of the
effort and an even smaller fraction of script length to do it in awk, but
the thing actually looks like a proper report when you are through by
default - you don't have to mess around with setting the field parameters
and alignment of the boxes so that it all displays nicely.  But, you feel,
this is the sort of thing I should be able to just do natively, without
going out to shell in different ways potentially in three different
operating systems with all the complexity that introduces.

Could you do it in Quartam?  Probably, but not in Linux at the moment.  

I don't do this for a living, , and restrict my OS environment, so its an
irritation not a showstopper, and its balanced by other eases of use in
other areas.  If I did it  for a living, and on multiple platforms, it would
make me think long and hard before adopting Rev as the general tool of
choice. 

A second issue (again it may be ignorance of best practice) is the sense of
fragmentation.  As the apps you take on become more complex, the tendency is
for the code to spread itself across many objects on many cards.  Now, for
maintainability, I'd like to track all uses of a given variable name or
object name in every script.  Its not obvious how to do it.  What I do
(please, tell me a better way) is patiently copy and paste every script into
a real editor - Geany or Kate.  In fact, I now have started to write the
scripts in Geany or Kate, having first drawn up a list of objects and
variables.   Then at least they are addressable as a whole, and in Kate you
have the double or triple window into the text, and global search and
replace works.  Its a bit tedious replacing all the scripts when written,
and tracking what you've done, but its possible given pencil and paper and
check lists.  It works, but one keeps feeling, surely an environment which
is bound to lead to lots of bits of individual scripts should have some
built in way of dealing with this better?  Maybe it does, and I've
idiotically not noticed?  

Its probably called GLX2 - but again, not for my chosen OS.

If I were 20 and had learned programming starting with Rev, these two things
would probably be what would make me 'move on'.  
-- 
View this message in context: http://www.nabble.com/Re%3A-Is-RR-too-easy--Or-too-hard--%28was%29-Is-RunRev-marketed-to-tp17561877p17572777.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list