What is the best way to learn LiveCode?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode systematically?

Post by uelandbob » Sun Jan 04, 2015 11:06 am

FourthWorld wrote: The 378-page User Guide is a great place to start, available through the IDE's Help menu.
How much of that have you read?
I have now looked through User Guide and it is a fantastic resource for looking up things. For instance if I see "frontScript" mentioned somewhere and I do not know what it is and what to use it for, I go to the User Guide, search for the word frontScript and get several hits with good and useful info.

However it is not "the basics" (or "model", or" mechanism", or "big picture", or "inner workings", I do not know what to call it). It is not the place to start if you are newcomer to LC. I know it gives links to other places, and I have not looked at all of them, but the ones I've looked so far are not it either. Maybe a list of questions that a newcomer asks himself and that he would like to see answered, would pinpoint it better.
Last edited by uelandbob on Sun Jan 04, 2015 1:20 pm, edited 1 time in total.
uelandbob@gmail.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: What is the best way to learn LiveCode?

Post by FourthWorld » Sun Jan 04, 2015 1:18 pm

I wonder if we're talking about the same resource. The Dictionary offers definitions but without much overview. The User Guide offers little in the way of specific token definitions but is designed to provide a conceptual framework for how LiveCode works. Which sections did you read?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode?

Post by uelandbob » Sun Jan 04, 2015 1:51 pm

FourthWorld wrote:I wonder if we're talking about the same resource. ... Which sections did you read?
I've looked through the whole document to see what it was about. I did not read every line but enough to understand what it is. Let's take "frontscript" as an example. If I search for it in the dictionary it does not give any hit. If I search on it in the User Guide this is what I get
TheMessageBox...Front Scripts – view and edit frontScripts... Select a front or back script to remove it or edit its script.

Using frontScripts
You can also extend the message path by placing objects into the front of the message path, before any other object. The script of such an object is called a frontscript, and you use the insert script command to place the object in the front:

Code: Select all

insert script of button "Interceptor" into front
Because the object is in the front of the message path, it receives messages even before the target of the message. For example, if you click a button, any objects in the front of the message path receive the mouseUp message first, before the button. If you place a handler in a frontscript, it receives all the corresponding messages before any other object can handle them.

Use a frontscript when you want to be able to handle a message even if the target object has a handler for it. For example, the LiveCode development environment displays a contextual menu when you Control-Shift-right-click an object. It does this with a mouseDown handler in a frontscript. Whenever you click an object, the frontscript receives the mouseDown message first, and checks whether the needed keys are being pressed. If they are, the handler displays the contextual menu; the mouseDown message is trapped and goes no further. Otherwise, the handler passes the message to the next object in the message path, which is the object you clicked.
...
The LiveCode IDE (integrated development environment) has been written using LiveCode. All the components – the Tools Palette, Property Inspector, Script Editor, Debugger, etc., are implemented as LiveCode stacks. The IDE has a series of library frontScripts and backScripts it uses to provide functionality both for the IDE and for your application.
Tip: Internally the IDE implements these plugin messages by intercepting system messages sent my LiveCode in the IDE frontScripts and backScripts then sending out a corresponding message to any loaded plugin.
...
The IDE uses the stack revLibrary to provide much of its functionality. The scripts are stored as a series of buttons and loaded into the frontScripts and backScripts when the IDE is started. To edit these scripts, go to the Front Scripts or Back Scripts tab within the Message Box and check the "Show LiveCode UI Scripts" checkbox.
Once I've read the above in the User Guide I know that I should search for the "insert script" in the Dictionary which gives me the following
Examples:

Code: Select all

insert the script of button "Message Library" into back
insert the script of this card into front
Use the insert script command to use an object's script as a library for frequently-used handlers.
Parameters:
object - The object is any object in an open stack.

Comments:
A script inserted into the front receives messages first, before the target object receives them. A script inserted into the back receives messages after all objects in the message path, just before the engine itself receives the message.
Objects added to the front or back are placed at the start of the frontScripts or backScripts list: the last-inserted object gets messages first.
Be aware that inserting scripts may make it difficult to understand how a stack behaves. If you use this command for development, be sure to carefully document which scripts are inserted, where, and when.
FourthWorld wrote: The User Guide ... is designed to provide a conceptual framework for how LiveCode works.
Even though the User Guide offers a kind of conceptual framework it is not that kind of conceptual framework I'm talking about. Let me ask you this question Richard

Do you think that the best way to learn the basics for a newcomer is to sit down and read the 378 page User Guide?
uelandbob@gmail.com

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: What is the best way to learn LiveCode?

Post by SparkOut » Sun Jan 04, 2015 2:20 pm

I think the best way is to start with the "hello world" tutorial, and the scripting conferences. Supplemented by Richard's message path guide and the User Guide for expanded enlightenment, once you "grok" it. Conceptually grasping the event driven paradigm of "messages" being "handled" is the most important to understand to streamline learning LiveCode. Between the tiny drop and puddle of "hello world" and scripting conferences and the big waters of the message path guide and open sea of the User Guide there are many waterways. Forum and Tutorials help navigate most of those, on the basis of each learner needing to find their own way.

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: What is the best way to learn LiveCode?

Post by magice » Sun Jan 04, 2015 4:30 pm

The best way of learning LiveCode will be different for everyone. For me the way is, by doing. And after 10 years I am still learning. I am constantly looking for things that I can do to speed up my work process. If I get an idea, I try it. If I get stuck I research it. If I can't find the answer I ask the forum. Often I know a way to do something, but I do it differently just to see if it will work. Ideas don't always have to be big apps either. As quick as LC is to use I build more "one use" apps than I do multiple use apps. For example about a month ago my boss came out of her office rubbing her head. After inquiring what was wrong, I found out that she had two text files of data that needed to be compared and any line of data that was in the first file but not in the second needed to be isolated out to a third. Since these files had thousands of lines she was expecting to be working on it for several days. So I tell her to email them to me. I write a very simple script and thirty minutes later my boss is looking at me like I am a magician. It was not any core understanding of LC that told me how to write those lines. It was the problem itself that formed the architecture of the solution. So, if you are looking for the fastest way to start using LC you have already gotten it in the form of all the resources posted here. If you are looking for inspiration on how to bend and manipulate the LC language to your desired effect it can only come from practice and creativity.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: What is the best way to learn LiveCode?

Post by dunbarx » Sun Jan 04, 2015 5:38 pm

What Magice said.

That is why I always promote trying your hand at making small pointless apps. It does not matter how trivial or silly or useless they are. Find every "s" in a piece of text. Make an address book or calculator. Make an encrypting gadget that transposes letters somehow and then decodes them ("a" = "b", "b" = "c", etc.) Or some other encoding scheme.

Anything. The effort to make these widgets far surpasses their usefulness, but that effort is enormously helpful in learning.

YOU CAN ONLY LEARN BY DOING. Period. Anyone want to make something of it?

Craig

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode?

Post by uelandbob » Sun Jan 04, 2015 6:36 pm

SparkOut wrote:I think the best way is to start with the "hello world" tutorial, and the scripting conferences. Supplemented by Richard's message path guide and the User Guide for expanded enlightenment, once you "grok" it.
Hi SparkOut, and thanks :D

As you say between the "hello world" and "User Guide" there is an in between that you call "grok it". The "grok it" is exactly the thing I am after. More than three years ago I started to look at cocos2d which is a platform for making iOS games. One of the first things I did was to make a small youTube video called "Introduction to cocos2d". It's a a 6 min video for people to "grok it", to put the cocos2d in the big picture of things. That was my first youTube tutorial ever so the quality of it was not the best, but over 5000 people has watched it and I only got thumbs up for it, which shows that there was a need for such an introduction*.

I think that LC is such a wonderful platform, and I looked for a "grok it" resource but haven't found one. That's why I was asking. If I do not find one, I will make one of my one and add it to the many other wonderful learning resources that people here at forum have contributed with.

You are referring to scripting conferences, What exactly is a scripting conference?

(*BTW I did a bunch of cocos2d tutorials after the introduction tutorial, that explained different aspects of cocos2d and these tutorials have been watched more than 178 000 times. When Apple came out with SpriteKit, which is almost a copy of cocos2d, I abandoned cocos2d, and today I am teaching how to create games with SpriteKit. But I am not happy about SpriteKit either, because it is too complex, so what I hope to do is to make apps with LC and supplement them with Externals written with Objective-C or Swift, but that's another story).
Last edited by uelandbob on Sun Jan 04, 2015 7:06 pm, edited 1 time in total.
uelandbob@gmail.com

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: What is the best way to learn LiveCode?

Post by Klaus » Sun Jan 04, 2015 6:45 pm

Hi Bob,
uelandbob wrote:...You are referring to scripting conferences, What exactly is a scripting conference?
check this: http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode?

Post by uelandbob » Sun Jan 04, 2015 7:28 pm

Thanks Klaus :D

This is the second time I get a link to that page so it must be good, I'll look carefully through it :)

I recognize the name of Dan Shafer there. He wrote several books on HyperTalk in the 80s. At that time I had most of the HyperCard books. I think Shafer's book called "Understanding HyperTalk" was my favorite. The big seller at that time was "The Complete HyperCard Handbook" by Danny Goodman, but I liked "Understanding HyperTalk" better. When Jobs killed HyperCard I threw all the HyperCard books, which is a shame, because I miss them now :cry:.
Last edited by uelandbob on Sun Jan 04, 2015 8:53 pm, edited 1 time in total.
uelandbob@gmail.com

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode?

Post by uelandbob » Sun Jan 04, 2015 8:05 pm

magice wrote:... by doing ...constantly looking for things that I can do to speed up my work process. If I get an idea, I try it. If I get stuck I research it. If I can't find the answer I ask the forum. Often I know a way to do something, but I do it differently just to see if it will work.... It was the problem itself that formed the architecture of the solution. ....
Migace, you are a pro :D

When I was at University, there was a guy called Anders, who had the highest grades in all subjects. He was exceptional, and I thought it was because he was very gifted. One day I sat next to him, when doing the exercises. The teacher had written on the blackboard the exercises we were supposed to do. As I stumbled on a particularly hard problem, I looked to see how Anders was doing. To my surprise he wasn't doing the exercise that the teacher had written on the blackboard, but another exercise. But, we are not supposed to do that exercise, I said to him. Ah, he answered, I don't care what the teacher writes, I always do ALL the exercises. That was a pro! Did he put in more time then the rest of us? Yes, but only initially. In due time his strategy paid off, and he could have higher grades, by putting in the same amount of time and effort. After that incident with Anders I adopted his method. I was willing to dig deeper then anybody else.

So I say you're method of working is excellent and I admire it :!:
uelandbob@gmail.com

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode?

Post by uelandbob » Sun Jan 04, 2015 8:44 pm

dunbarx wrote:trying your hand at making small pointless apps... YOU CAN ONLY LEARN BY DOING. Period.
Craig
Good insight as always Craig :D

Though learning is not the only thing. First you need to decide if you want to learn it in the first place. There are a lot of different programming platforms and programming languages. Java, Visual Basic, Cocoa, iOS, Android, Lisp, Scheme, Flash, Python, Scratch, Mathematica, etc, etc, etc. So which one should you choose, which one will you dedicate months if not years of your life to?

Sometimes small things persuade in one direction or the other. Reading the book Hackers and Painters by Paul Graham I stumbled on this sentence
Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.
That one sentence got me to study Lisp for several months.

Sometimes you choose a certain platform or a certain programming language because you see a YouTube tutorial that inspires you and wets your appetite, or you like the way the author explains things.

On other occasions you abandon a platform because the people at the forum are stiff philistines. (I'm not talking about this forum. Here I have been met with help and kindness).

In my mind the important factors are the quality of: The platform itself (the user friendliness, simplicity, etc) , the forum (people's attitude, friendliness, knowledge, and tolerance to others of different opinion), the learning resources (good explanation, good examples).

There is a silent notion that things get better as the time progresses. That is not so in programming. Many old ideas are far superior then the "modern and popular" solutions. The most popular programming platforms today are based on Java, C#, Objective-C, Swift, .... For me they are all one and the same paradigm, dinosaurs that will crumble under their own weight. They are Roman numerals of today and we deserve something better. HyperCard was ahead of its time when it came in 80s and still is. I think that the future belongs to a programming platform that shares HyperCard's paradigm*.

As you say the best way of learning is learning by doing. I have no other opinion there. (However there is also a question of learning in what order, with what insight and with what motivation.)

(*HyperCard isn't the only good idea though. How many of you have heard of a programming language called Self from 1980s? (See Self and Self: Whys and Wherefores" on YouTube ) It was the first classless object oriented language. Instead of classes cloning of objects was used, thus eliminating the need for the classes altogether. HyperCard used this idea in its design. There are wonderful ideas in Mathematica, that are far ahead of its time.)
uelandbob@gmail.com

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: What is the best way to learn LiveCode?

Post by uelandbob » Tue Jan 06, 2015 5:44 pm

I've made a YouTube Video that puts the LiveCode in the bigger picture and explains why it matters. I've tried to explain the machinery behind LiveCode in big brushstrokes, and put things in perspective. This is what I was after in the first place, but it was kind of hard to explain.

http://youtu.be/PEE1jTUrHno

Any comments welcome
uelandbob@gmail.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: What is the best way to learn LiveCode?

Post by FourthWorld » Tue Jan 06, 2015 6:33 pm

Nicely done, uelandbob. Thanks for posting that.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply