Code Samples/Comparisons
Dave Cragg
dave.cragg at lacscentre.co.uk
Sat Dec 5 05:48:03 EST 2009
On 4 Dec 2009, at 16:23, Kevin Miller wrote:
> We will continue to work on finding good ways to realistically and clearly
> make the case for revTalk. It is very good news that there is now a debate
> going on.
I can't argue with that. But I wonder if code comparisons will lead to any fruitful conclusions. They often seem removed from the practical tasks we are trying to perform. For example, the Rev code example used in the pdf:
get last item of line 2 of url "http://ichart.finance.yahoo.com/table.csv?s=RBS.L"
In what circumstances would you ever need to use this. The url returns over 1700 lines of text, and so many questions are raised:
-- Why would you download so much data just to get a single item?
-- How do you know you want the second line? (OK, I realise it's the most recent data item, but it's a special case, and relies on the data always coming back in the right order.)
What if the task was to download the data and display it in a line graph, with a dropdown menu that allowed you to filter for different months/years/etc.? Would this be easier in Rev than other environments? That would be a good comparison and would show off more of Rev's capabilities.
Here's another comparison. In this case the task is just to put some text in a text field. RevTalk compared with Action Script.
put "Hello World" into field "myTextField"
myTextField.text = "Hello World"
We could argue all day about which is easier to write/read/understand. But for me, a bigger question is what is involved in getting the text field in the window in the first place. And how easy is it to set up and use. This is where Rev shines. Drag a field and a button off a palette, enter your script, and click the button. Easier than writing an email. Even a maths professor could do it.
I still remember the "build an application while holding your breath" performance from some years ago. I think it made the point much better than any amount of code comparison.
Cheers
Dave
More information about the use-livecode
mailing list