Page 1 of 2

Very disappointed with revolution

Posted: Wed Oct 07, 2009 1:11 am
by therock777
I have to admit that this programing language is simple to use, but that takes effect after you know the language, just like any other programing language. My problems is that I have not being able to find a systematically approach at learning revolutions. I have gone through all the tutorials and manuals, but I still can't think logically when it comes to create a small app, not even a simple one, and this is due to the lack of books and more extensive documentation in my opinion.

I'm just a little be frustrated because I'm unable to grasp the essence of the language to create a very simple app even after I went through the many examples, and user manual.

Can someone share with me the path they took in order to learn Revolution? resources, books, etc ?

Please bear with me, I'm coming from the python world, and there is a great deal of tutorials and documentations. Unfortunately, I'm getting to the point in which I'm about to give up.

Help!

Thanks

The Opposite Experience

Posted: Wed Oct 07, 2009 4:30 am
by dickey
Hello therock777,

I have been using Revolution only a short time, but have had the near opposite experience to that you describe.

I have a varied development background with PHP most prominent in the last few years.

If you know one language already 'Python', I would approach life like this.

Before even thinking about my first real application in Rev, I tried to pick the top 100 things (which was a struggle due to laziness) I do on a daily basis in the language I am familiar with (in my case PHP) and tried to emulate that functionality in Revolution in what I called my sandbox stack.

I created a card for each piece of functionality and tried to emulate the 10 things per night. Nothing major - but things like:

23. find the last occurrence of a comma in string x
24. connect to mysql on server x and query a table

I copied my PHP snippets into a text field for reference and then, created simple models (a few fields and buttons) and some Rev code behind them to emulate what I would usually do in PHP. It was amazing how quickly the strengths and differences of the language became apparent, as too the GUI possibilities so foreign to the PHP, Perl or Python programmers, generally. By the end of the week I had a quasi but rough Rev for PHP developers guide.

The second step would be to build something small go to woe. Create something well within your usual capabilities. A data entry form connected to a database, a couple of reports, a batch process - any workflow. You will find your mind switch gradually to the gui driven environment of rev with stacks, message paths etc, which in my mind is where the transition for a Python and PHP programmer truly lies.

Without trying to sound like a total bozo (or indeed crazy) - I don't know whether others new to Rev notice it, but writting Rev code is like writing some hybrid old english poetry. It has a kind a rhythm to that cuts down on coding errors, because you kind of sense by the flow of the sentence when something doesn't seem right. I guess that is why you see a lot of variables named theSomething as they read well. But that flow is different from Perl/PHP/Python which tend to be C like, and that can be a bit frustrating in the first few days: put "the poety of rev code" into "a place where the sun doesn't shine"

Don't despair a perceived lack of books and documentation. Call me a book burner, but I favour quality over quantity any day. PHP for mind has as much bad doco as it does good. The Rev doco is insufficient but it is good quality, and the dev community are accommodating in constrast to the ask a silly question an face the firing squad mentality of some PHP and Python forums.

And finally for me it was balancing my preconception of the application I thought I would build with Revolution against a more rev acquainted view of that same application. Whilst the functionality delivered on my first app is akin to what I had set out to do the implementation is far different.

Even for an experienced programmer, I don't expect any cross train (rev included) won't take time or won't have frustrations.

Hey if all else fails I remember a project some time back that I used the wxwidgets C library for Python to create a cross platform GUI app using Python.

To be honest (I found I needed to learn a lot about Rev), before I could judge whether it the tool for my project - which when you are busy is a leap of faith.

Just remember programming is designed to deliver discomfort on a daily basis.

I hope that helps.

Kind regards, Andrew

Posted: Wed Oct 07, 2009 12:30 pm
by bn
Hi theRock777,

maybe this thread gives you a little comfort :)
http://forums.runrev.com/phpBB2/viewtopic.php?t=3223
regards
Bernd

Posted: Wed Oct 07, 2009 3:21 pm
by Philhold
My problems with RunRev having come from being a dabbler in Perl, PHP and Filemaker is this (actually ignore Filemaker for a minute).

In Perl for example my scripts are procedural and mainly CGIs. I pull in any libraries and modules I need at the top of the script and then I decode the input variables, I validate the variables, then I do a series of calculations etc with the variables, then I return the results to the user usually as a heredoc HTML page. The script starts at the top and flows logically to the bottom. PHP is similar but I might have it interspersed with HTML.

Now with RunRev I have all sorts of components that can interact with each other, the message path has front scripts, back scripts, stack scripts, object scripts, card scripts etc, etc. If I want to print out the scripts from a stack in a logical sequence so I can look at it I can't. If I want to find out how someone has done something in one of their stacks I have to first try and guess where they might have put the script that does it and then read that bit of script and because RunRev can store information all over the place and the language doesn't have any visual markers I find it very difficult to track these down even using the application browser. In Perl for example I can spot a variable being stored in an array because the syntax has a visual element to it.

In Filemaker I can have scripts and calculation fields and these can interact with each other in a constrained way. If I want to print out what all of the fields and scripts do I can do that. The constraints of Filemaker and the fact that it is "just" a database make it understandable, there's a flow in writing an "application". RunRev does not have these constraints and is therefore orders of magnitude more flexible but the flexibility which no doubt one day I will find incredibly useful is making it difficult for me to get started properly.

I suspect that the best approach is to just start cobbling together a user interface, then work out how you get it to function afterwards.

Cheers

Phil

Posted: Wed Oct 07, 2009 4:02 pm
by Garrett
I usually do not use tutorials myself when learning something. Learning by example usually works for me so when I started learning Rev, I hit a lot of examples, compared their code to the Rev documents, played with the examples to see what I could do and if I understood what they were doing.

I also spent a lot of time asking questions here on the forums(previously on the mailing list but prefer this forum instead.)

It took some time for it to hit me, but I kept at it and eventually it hit me like a Locomotive.

Since then I have read many tutorials to re-enforce what I have learned as well as to learn better techniques for coding in Rev.

I came from a Basic programming background and not that abomination called VB, real basic programming such as QuickBasic, PureBasic, Blitz, Liberty Basic, the kind that are line for line interpreted. I knew that I would have to stop thinking like I did when programming in basic and clear my mind. That was hard to do after programming with some form of basic for over 10 years. But it is very important that you stop or avoid thinking in terms of the programming languages you already know. I can imagine that thinking in terms of Python that it will cause you some mental blockage while trying to learn Rev. Python is much like Basic and Rev isn't like either of them.

Last but not least... Do not be embarrassed to ask even the most simple of questions here. You may think or feel that someone might think less of you, but they won't. Just be sure that you have exhausted your own efforts first before asking.

Posted: Wed Oct 07, 2009 4:10 pm
by therock777
Thank you all for your support and encouragement, I'll take into consideration these suggestions and I will put it into practice.

Posted: Wed Oct 07, 2009 4:47 pm
by FourthWorld
Thanks for the post, Rock. You've touched on a key issue with adoption, which risks not only future growth for the language but more importantly your own good times. :) I wouldn't mind seeing more of this sort of frank discussion here.

FWIW, after teaching Rev as a second language for some years now I've found the following pattern to be fairly consistent with most newcomers:

- Two days into the product: "What the hell is going on? I can't
figure this thing out! Damn, what were they thinking?"

- One week: "Wow. I've reviewed the language dictionary and I'm
very intrigued by what's there. If only I could put
all the parts together to make something useful."

- Two weeks: "I just finished my first project. It was a bit of
a challenge but I think I'm getting the hang of this."

- One month: "Cool. I'm feeling confident with this. I can do
most of what I need, and although I'm still looking
up a lot of terms in the Dictionary I'm beginning to
feel really good about this."

- Six months: "I love this thing. I'm at least as productive with
Rev as I had been with the other tool I'd been using
for years, maybe more so."

- One year: "I love this thing like no other."

My own path was one of experimentation, and one I encourage newcomers to use: pick a small task like loading a file into a field and writing it back out again, then add to it by rearranging the text in the field, then try downloading web pages and scraping elements out of them, and so on. Start small, ensure success at each step, build on that success as you go forward.

May I ask how you learned Python, and what sort of apps you'd like to build in Rev? That background may help us point to specific learning resources which might be especially useful for your experience and interests.

Posted: Wed Oct 07, 2009 5:20 pm
by Philhold
I feel like I'm at the one week stage after 6 months. :cry:

Cheers

Phil

Posted: Wed Oct 07, 2009 6:25 pm
by FourthWorld
I still feel like that some mornings. :)

Earlier you wrote something very interesting:
In Perl for example I can spot a variable being stored in an array because the syntax has a visual element to it.
It's easy to write RevTalk in a style that looks enough like English that any visual distinction between elements of the language are lost. Some consider this a benefit, but I suspect you and I share the same observation that code isn't read nearly as frequently as it's skimmed, making such visual distinctions very helpful for zeroing in on specific things rapidly even if it feels less like reading a novel (besides, when I want to read a novel I prefer Vonnegut over my code <g>).

A while back I discovered that a lot of people I know had the same sensitivity to visual distinction of language elements and that many of them were using the same style, an ad hoc sort of "Hungarian-lite", which I've documented here:

http://www.fourthworld.com/embassy/arti ... style.html

I'm not sure if that's the sort of thing you were referring to with your Perl comment, but if so hopefully that'll help spark some ideas as you develop your own Rev style, and if not I'd be interested in learning more specifically what you meant.

Posted: Wed Oct 07, 2009 9:00 pm
by Philhold
Hi Richard,

Thanks for reminding me of your article. Yes I was a bit disappointed when I realised I couldn't have $variables and

%hash = (
"key"=>"value",
"key2"=>"value2"
);

and @array = ("one","two","three");

Or maybe I can and don't realise it.

I had read your article previously and had decided to follow your suggestions for global (gVar), temp (tVar) etc. I never started doing this in Filemaker for naming fields and do wish I had imposed the discipline on myself. Commenting is also clearly very helpful in any language but I do like your suggestions for comment flags. --? --| etc.

Is there any reason why I cant have g_var, t_var etc?

Cheers

Phil

Posted: Wed Oct 07, 2009 10:56 pm
by Mark
Philhold,

Revolution is able to determine by itself whether a variable contains a text or a number. So, normally you don't need to define that. Furthermore, you can put any kind of data into a variable, which means that it is unnecessary to define variable type.

Waht you do you mean, can't have g_var? In all languages I use, I try to avoid using the underscore, because natural language doesn't contain underscores in the middle of words. Why do you want to use underscores?

Another tip, just use object names with spaces in them, if you need multiple words for object names. There is no reason whatsoever to replace spaces with underscores.

Best,

Mark

Posted: Wed Oct 07, 2009 11:32 pm
by therock777
Richard,
Thanks for your valuable input.
May I ask how you learned Python, and what sort of apps you'd like to build in Rev? That background may help us point to specific learning resources which might be especially useful for your experience and interests.
I had a good experience while learning python, and that was due most likely to the great deals of tutorials, books, and all kinds of resources that are available out there for this language.

My learning path was as follow:

The Basics
Literarls, numbers, Strings, Variables, Indentifier Naming, Datat types,
Operator and expressions, Control Flow, etc.

Intermediate
Functions, Modules, Data Structures.

Advaced
Classes, Objects, Input/Output, Exceptions, Py standard Library.

I'm interested in developing desktop apps, CRM, Multimedia, and data driven apps to start with.

I know it's going to take me some time to get there, but that's my goal.

Based on your experience with revolution, would share what revolution is not good for? We all know that all programing languages have their weaknesses and strengths, I just want to make sure I'll be using this language for the correct apps, before I learn it well.

Thanks,

Leonardo-

Posted: Thu Oct 08, 2009 1:06 am
by therock777
Okay, I have been doing my research for more tutorials and some sort of logical and systematic approach to learn Revolution. For those that are in the same boat as me, I have found a good introduction to Revolution that in my opinion will lay the foundation to understand the language building blocks. And subsequently, trace the path for greater projects.

Here is the link;

http://revolution.byu.edu/chum210.001/schedule.php

Regards,

Leonardo

Posted: Thu Oct 08, 2009 2:39 am
by Garrett
I can relate to the visual angle of viewing code also. Specifically I really like to be able to distinguish the variables as quickly as possible. To deal with this I started adding "var" to the beginning of all my variables so that it would allow me to quickly find my variables within code.

Variable named "TheText" becomes "varTheText".

Richard... Wow! I wish I had been pointed to that article of yours there a while ago. I just briefly scanned it just now and was shocked to see that I already practice some of what was noted there... As well saw many things that I currently do not do and plan on doing from this point on!

In fact, I think I'll start using your variable naming conventions instead of my current way of naming variables.

Thank you for mentioning that link here again for us. :-)

Posted: Thu Oct 08, 2009 9:27 am
by Philhold
So, normally you don't need to define that. Furthermore, you can put any kind of data into a variable, which means that it is unnecessary to define variable type.
Hi Mark,

I think that is the whole point, for many of us this causes confusion rather than helpful flexibility. Some of us need to make self imposed rigours. One day I think I will get to the point where I see what you see and can make use of the flexibility but I just don't think I'll ever get there unless I build in some form of flag system for my variables.

I like Garrett's suggestion.

Cheers

Sid