Quantcast

Beginner to programming. References to understand terms.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
71 messages Options
1234
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Beginner to programming. References to understand terms.

Bill Kelsoe
Hi,
I have been reading PIL 5.1/RM5.1 but I just finished the first two chapters in PIL with some basic understanding. I found the following terms undescribed or briefly described in technical terms that I could not understand. I was hoping for a reference for a baby trying to understand programming for the first time of their life. For example, the lines of code separated by two dashes line (comment), is a chunk. An Object is part of a Class but I dont even know what an object is or the class to begin with.


Array (and associative type)
Argument
Calls(Function Calls)
Constructor
Compiler
Class
Chunk
Data structure
Definition(Multi-line)
Declaration
Delimit
Expression
Element
Function
Interpreter
Identifier
Index
Initialisation
Object
Prompt
Parameter
Procedure
Tuple
Table
String
Shell
Statement
Sentinel
Variable (dummy, local, global, non-initialised)
Value (immutable, non-value, first class)

Thanks in advance,
Adel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Paul E. Merrell, J.D.
On Sun, Apr 23, 2017 at 11:40 PM, Bill Kelsoe [via Lua]
<[hidden email]> wrote:
> Hi,
> I have been reading PIL 5.1/RM5.1 but I just finished the first two chapters
> in PIL with some basic understanding. I found the following terms
> undescribed or briefly described in technical terms that I could not
> understand. I was hoping for a reference for a baby trying to understand
> programming for the first time of their life. For example, the lines of code
> separated by two dashes line (comment), is a chunk. An Object is part of a
> Class but I dont even know what an object is or the class to begin with.

The Lua ecosystem is not friendly to programming neophytes. (I was one
when I came to Lua.) That's a shame because it is an extremely
well-designed language and far more simple than many other programming
languages.

You can find definitions for many of the terms you listed using
Google's definition search. The syntax is:

   define:[a word or phrase that you want a definition for]

Note the absence of white space after the colon.

Also, I'll recommend a book by Karl Jung and Aaron Brown, Beginning
Lua Programming: <http://shop.oreilly.com/product/9780470069172.do>.
It's aimed at Lua v. 5.1. But later versions of Lua are similar enough
that most of the book holds true for versions 5.2 and 5.3 as well.

I've advocated for a couple of years for an online version of the Lua
Reference Manual that can be annotated for beginners with definitions,
example code, and links to other resources such as pages on the wiki,
but there doesn't seem to be any energy in the community for creating
a beginner resource like that.

Best regards,

Paul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

steve donovan
In reply to this post by Bill Kelsoe
On Mon, Apr 24, 2017 at 8:39 AM, Bill Kelsoe <[hidden email]> wrote:
> Array (and associative type)
> Argument
> Calls(Function Calls)
> Constructor
> Compiler
> Class
> Chunk
> Data structure

Yes, this is the basic vocabulary of programming language concepts.
It's surprisingly hard for a non-beginner to remember their original
difficulties (often called the 'expert problem').

I did a few searches and this material is scattered all over the
place. Often the introductions make the mistake of illustrating
concepts with a whole bunch of programming languages, which is
confusing. Hitting Wikipedia all the time can be frustrating.

There's definitely a need for some introductory material here that
defines these terms informally, illustrated with Lua.

For instance, it is a little strange at first that we 'call' a
function and 'pass' it 'arguments'.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Paul E. Merrell, J.D.
I should have remembered to pass a link to the Wiki. You will find it
helpful. <http://lua-users.org/wiki/LuaDirectory>.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Dirk Laurie-2
In reply to this post by steve donovan
2017-04-24 9:44 GMT+02:00 steve donovan <[hidden email]>:

> On Mon, Apr 24, 2017 at 8:39 AM, Bill Kelsoe <[hidden email]> wrote:
>> Array (and associative type)
>> Argument
>> Calls(Function Calls)
>> Constructor
>> Compiler
>> Class
>> Chunk
>> Data structure
>
> Yes, this is the basic vocabulary of programming language concepts.
> It's surprisingly hard for a non-beginner to remember their original
> difficulties (often called the 'expert problem').
>
> I did a few searches and this material is scattered all over the
> place. Often the introductions make the mistake of illustrating
> concepts with a whole bunch of programming languages, which is
> confusing. Hitting Wikipedia all the time can be frustrating.
>
> There's definitely a need for some introductory material here that
> defines these terms informally, illustrated with Lua.
>
> For instance, it is a little strange at first that we 'call' a
> function and 'pass' it 'arguments'.

If I had my way, beginners to programming would learn Pascal first,
in more or less its original form. Then Lua, starting with the sentence
"Lua looks a little like Pascal, but is a lot more powerful." After that,
concepts get explained in terms of how they differ from Pascal.

As a bonus for this idea, Free Pascal currently offers a Lua module.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Andrew Starks-2

On Mon, Apr 24, 2017 at 07:25 Dirk Laurie <[hidden email]> wrote:
2017-04-24 9:44 GMT+02:00 steve donovan <[hidden email]>:
> On Mon, Apr 24, 2017 at 8:39 AM, Bill Kelsoe <[hidden email]> wrote:
>> Array (and associative type)
>> Argument
>> Calls(Function Calls)
>> Constructor
>> Compiler
>> Class
>> Chunk
>> Data structure
>
> Yes, this is the basic vocabulary of programming language concepts.
> It's surprisingly hard for a non-beginner to remember their original
> difficulties (often called the 'expert problem').
>
> I did a few searches and this material is scattered all over the
> place. Often the introductions make the mistake of illustrating
> concepts with a whole bunch of programming languages, which is
> confusing. Hitting Wikipedia all the time can be frustrating.
>
> There's definitely a need for some introductory material here that
> defines these terms informally, illustrated with Lua.
>
> For instance, it is a little strange at first that we 'call' a
> function and 'pass' it 'arguments'.

If I had my way, beginners to programming would learn Pascal first,
in more or less its original form. Then Lua, starting with the sentence
"Lua looks a little like Pascal, but is a lot more powerful." After that,
concepts get explained in terms of how they differ from Pascal.

As a bonus for this idea, Free Pascal currently offers a Lua module.

First C, then Lua. Those that drop out didn't want to be programmers. That's a difficult message to receive when you're 8, but it's a harsh world. ;)

-Andrew


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

steve donovan
In reply to this post by Dirk Laurie-2
On Mon, Apr 24, 2017 at 2:25 PM, Dirk Laurie <[hidden email]> wrote:
> If I had my way, beginners to programming would learn Pascal first,
> in more or less its original form.

I did program Pascal in the original form, and it did liberate me from
Fortran-thinking.

But it isn't a good introduction to Lua ;)  For one thing, static
typing is extra overload for beginners, and second, the concepts don't
match over that very well.

Loops, conditionals, blocks, lexical scoping, functions, etc are all
present in particularly clear forms in Lua. But  I think there's room
for a very gentle intro that doesn't assume the shared vocabulary of
programming.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

steve donovan
In reply to this post by Andrew Starks-2
On Mon, Apr 24, 2017 at 2:41 PM, Andrew Starks <[hidden email]> wrote:
> First C, then Lua. Those that drop out didn't want to be programmers. That's
> a difficult message to receive when you're 8, but it's a harsh world. ;)

You jest sir ;)  There is a useful distinction between 'people who
need to do a little programming' and 'programmers'.

Might as well say - why not Rust? ;)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Oliver Kroth
In reply to this post by Andrew Starks-2

First C, then Lua. Those that drop out didn't want to be programmers. That's a difficult message to receive when you're 8, but it's a harsh world. ;)


I do personally not see a necessity to have studied C before migrating from Pasal to Lua.
It might be useful to have visited Modula-2, but C is syntactically quite different to Lua, Pascal and Modula-2 is therefore avoidable effort.

Additionally, the language concept is not a dynamical one, which trains methods to solve programming tasks that are superfluous or unnecessary complex in Lua.
I know what I am talking about. And I have seen Lua code being written by C experts. Not brilliant ....

It's not that I do not like C... but it's not the most direct route to get to Lua

--
Oliver




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

steve donovan
On Mon, Apr 24, 2017 at 3:09 PM, Oliver Kroth <[hidden email]> wrote:
> It's not that I do not like C... but it's not the most direct route to get
> to Lua

The best route to Lua, is Lua.  All other languages introduce
irrelevant weirdness ;)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Andrew Starks-2
In reply to this post by steve donovan

On Mon, Apr 24, 2017 at 07:51 steve donovan <[hidden email]> wrote:
On Mon, Apr 24, 2017 at 2:41 PM, Andrew Starks <[hidden email]> wrote:
> First C, then Lua. Those that drop out didn't want to be programmers. That's
> a difficult message to receive when you're 8, but it's a harsh world. ;)

You jest sir ;)  There is a useful distinction between 'people who
need to do a little programming' and 'programmers'.

Might as well say - why not Rust? ;)

I do jest, but only partly.

I community college, we learned Karel the Robot, which I found fascinating. I learned how to compose functions, control structures, etc. then I learned the basics of C, and then an advanced class in C (which was just pointers and using libraries and not very advanced). 

Years later, when I picked up programming again, I started with VB and I was struck with how redundant and complicated it was. 

If you need to get some work done and want to make a little machine that produces results and can be easily extended, my hands down choice is a spreadsheet. 

If you want to learn the craft of programming on modern computers, my limited experience suggest starting with C (Head First C, probably). 

But, upon reflection, learning computer science is different than learning languages and C is not the simplest environment to learn about control structures, etc. I like Lua as a first language because it has few surprises. However, I suspect that learning how to program from Lua would require a disciplined curriculum. 

Beginning Lua Programming is an excellent book and is still worth the read, even though it's stuck way back in Lua 5.1. 


-Andrew


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

steve donovan
On Mon, Apr 24, 2017 at 3:17 PM, Andrew Starks <[hidden email]> wrote:
> Years later, when I picked up programming again, I started with VB and I was
> struck with how redundant and complicated it was.

It is a silly language, no doubt.

> But, upon reflection, learning computer science is different than learning
> languages and C is not the simplest environment to learn about control
> structures, etc.

This is in fact another distinction. There are people who want to
learn Computer Science, first establishing the language needed to
speak about programs ('scope','function' etc), there are those
who want to learn programming and need a stepping-stone to move down
from high-level to low-level. Then there are people who need to do a
few scripts.

As for C, I still maintain that C++ is easier to learn - sensible
strings, nice containers to put things, etc - until you misplace some
punctuation and the compiler shares its confusion with you. Can always
drop down to C-level, but C is premature optimization, unless you
really have a dinky little micro with 4K RAM.

 I like Lua as a first language because it has few
> surprises. However, I suspect that learning how to program from Lua would
> require a disciplined curriculum.

Yes! As Oliver says, C programmers will spontaneously learn to write
crap Lua. Everyone needs guidance at first. There were a few
interesting take-aways from the LOGO project at MIT - exposing kids to
programming, beautiful environment even involving real mechanical
Turtles!  And kids will learn without fear - but what they don't learn
themselves is how to structure programs, and split functions into
little functions.

I do know that PUC-Rio taught Lua as a first language (at least at one
point). What were the lessons from that?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

chris beck
> First C, then Lua. Those that drop out didn't want to be programmers. That's a difficult message to receive when you're 8, but it's a harsh world. ;)

I liked using Microsoft QuickBASIC when I was 8, that was a really nice little programming environment for a kid. :)

On Mon, Apr 24, 2017 at 6:33 AM, steve donovan <[hidden email]> wrote:
On Mon, Apr 24, 2017 at 3:17 PM, Andrew Starks <[hidden email]> wrote:
> Years later, when I picked up programming again, I started with VB and I was
> struck with how redundant and complicated it was.

It is a silly language, no doubt.

> But, upon reflection, learning computer science is different than learning
> languages and C is not the simplest environment to learn about control
> structures, etc.

This is in fact another distinction. There are people who want to
learn Computer Science, first establishing the language needed to
speak about programs ('scope','function' etc), there are those
who want to learn programming and need a stepping-stone to move down
from high-level to low-level. Then there are people who need to do a
few scripts.

As for C, I still maintain that C++ is easier to learn - sensible
strings, nice containers to put things, etc - until you misplace some
punctuation and the compiler shares its confusion with you. Can always
drop down to C-level, but C is premature optimization, unless you
really have a dinky little micro with 4K RAM.

 I like Lua as a first language because it has few
> surprises. However, I suspect that learning how to program from Lua would
> require a disciplined curriculum.

Yes! As Oliver says, C programmers will spontaneously learn to write
crap Lua. Everyone needs guidance at first. There were a few
interesting take-aways from the LOGO project at MIT - exposing kids to
programming, beautiful environment even involving real mechanical
Turtles!  And kids will learn without fear - but what they don't learn
themselves is how to structure programs, and split functions into
little functions.

I do know that PUC-Rio taught Lua as a first language (at least at one
point). What were the lessons from that?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Russell Haley
In reply to this post by Bill Kelsoe
Hi Adel, See my comments below your original email (it's called a bottom post).

On Sun, Apr 23, 2017 at 11:39 PM, Bill Kelsoe <[hidden email]> wrote:

> Hi,
> I have been reading PIL 5.1/RM5.1 but I just finished the first two chapters
> in PIL with some basic understanding. I found the following terms
> undescribed or briefly described in technical terms that I could not
> understand. I was hoping for a reference for a baby trying to understand
> programming for the first time of their life. For example, the lines of code
> separated by two dashes line (comment), is a chunk. An Object is part of a
> Class but I dont even know what an object is or the class to begin with.
>
>
> Array (and associative type)
> Argument
> Calls(Function Calls)
> Constructor
> Compiler
> Class
> Chunk
> Data structure
> Definition(Multi-line)
> Declaration
> Delimit
> Expression
> Element
> Function
> Interpreter
> Identifier
> Index
> Initialisation
> Object
> Prompt
> Parameter
> Procedure
> Tuple
> Table
> String
> Shell
> Statement
> Sentinel
> Variable (dummy, local, global, non-initialised)
> Value (immutable, non-value, first class)
>
> Thanks in advance,
> Adel

Hi Adel,

Were you able to run any of the examples? If so, a number of the terms
you list can be described very easily through example. The important
ones for you are:

Shell
Variable
Loop (I added this)
Function
String
Table

You will learn the rest by accident if you run some simple programs.
Do you have Lua installed?

Cheers,

Russ

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Coda Highland
In reply to this post by steve donovan
On Mon, Apr 24, 2017 at 5:49 AM, steve donovan
<[hidden email]> wrote:

> On Mon, Apr 24, 2017 at 2:25 PM, Dirk Laurie <[hidden email]> wrote:
>> If I had my way, beginners to programming would learn Pascal first,
>> in more or less its original form.
>
> I did program Pascal in the original form, and it did liberate me from
> Fortran-thinking.
>
> But it isn't a good introduction to Lua ;)  For one thing, static
> typing is extra overload for beginners, and second, the concepts don't
> match over that very well.
>
> Loops, conditionals, blocks, lexical scoping, functions, etc are all
> present in particularly clear forms in Lua. But  I think there's room
> for a very gentle intro that doesn't assume the shared vocabulary of
> programming.

I think I disagree with both sides of that. :P

On the one hand, I think that Pascal in its original design is too
alien from how modern code is organized to be a good choice.
"Structured programming" is out of style, and trying to think about
how to organize functions to only ever have one exit point is probably
more harmful than helpful to learning good style.

On the other hand, I think static typing is actually beneficial to
beginners. In my experience, a lack of restrictions CREATES problems
for novices, and the presence of restrictions provides the boundaries
to help define the universe of ideas. Pascal's insistence on
structured programming is built on the same concept.

I think of the modern languages I know, it's probably C# that comes
closest to the ideal teaching language in my opinion. It's not perfect
for the role because of a few places where it's a little TOO nitpicky,
and the standard libraries inherited a lot of ugly legacy Microsoft
design decisions, but I think that a C#-like language with a
well-designed set of beginner-friendly libraries would be an excellent
choice for teaching.

/s/ Adam

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Coda Highland
In reply to this post by steve donovan
On Mon, Apr 24, 2017 at 5:51 AM, steve donovan
<[hidden email]> wrote:
> On Mon, Apr 24, 2017 at 2:41 PM, Andrew Starks <[hidden email]> wrote:
>> First C, then Lua. Those that drop out didn't want to be programmers. That's
>> a difficult message to receive when you're 8, but it's a harsh world. ;)
>
> You jest sir ;)  There is a useful distinction between 'people who
> need to do a little programming' and 'programmers'.
>
> Might as well say - why not Rust? ;)
>

I started in BASIC and look how I turned out! v ̄v

/s/ Adam

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Dirk Laurie-2
2017-04-25 4:57 GMT+02:00 Coda Highland <[hidden email]>:

> On Mon, Apr 24, 2017 at 5:51 AM, steve donovan
> <[hidden email]> wrote:
>> On Mon, Apr 24, 2017 at 2:41 PM, Andrew Starks <[hidden email]> wrote:
>>> First C, then Lua. Those that drop out didn't want to be programmers. That's
>>> a difficult message to receive when you're 8, but it's a harsh world. ;)
>>
>> You jest sir ;)  There is a useful distinction between 'people who
>> need to do a little programming' and 'programmers'.
>>
>> Might as well say - why not Rust? ;)
>>
>
> I started in BASIC and look how I turned out! v ̄v

BASIC on the Apple II was in many ways the ideal beginner's language.

Any clever kid could pick it up in 10 minutes just by watching someone
who already knew it. In a house with five kids and one computer, like I
had in the 1980s (not counting my Olivetti, they were not allowed to touch
that), they had to make their 30 minute-turns worth while, and the other
four are going to look at the performance every minute, vicariously lifting
survivors with a chopper or listening for crunching boots on gravel — and
watching the whizzkid doing Basic. Not keeping quiet, of course, so the
art of grunting out monosyllabic almost-informative hints without losing
one's own concentration is also learnt.

BASIC had just a few keywords and automatically numbered your lines.
The system, such as it was, was integrated with it,  And it had graphics.
MOVE 10, TURN 30, PEN DOWN, MOVE 20. It gave a wow factor.

And then came Z80 cards, and CP-M, and our current computing world
was born.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Paige DePol
Dirk Laurie <[hidden email]> wrote:

> BASIC had just a few keywords and automatically numbered your lines.
> The system, such as it was, was integrated with it,  And it had graphics.
> MOVE 10, TURN 30, PEN DOWN, MOVE 20. It gave a wow factor.

I think you may be conflating BASIC and LOGO with one another.

A search of Apple II BASIC keywords does not reveal any keywords for MOVE, TURN, PEN DOWN... However, those most assuredly are keywords for LOGO! :)

Personally, I grew up using the Atari family of computers... in some ways I miss the simplicity of the 8-bit days. However, I do not miss 1 mHz processors or floppy drives... or cassette tapes! ;)

~Paige



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Dirk Laurie-2
2017-04-25 8:30 GMT+02:00 Paige DePol <[hidden email]>:
> Dirk Laurie <[hidden email]> wrote:
>
>> BASIC had just a few keywords and automatically numbered your lines.
>> The system, such as it was, was integrated with it,  And it had graphics.
>> MOVE 10, TURN 30, PEN DOWN, MOVE 20. It gave a wow factor.
>
> I think you may be conflating BASIC and LOGO with one another.

Oops! You're right, of course. Never trust the memory of a septuagenarian.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beginner to programming. References to understand terms.

Enrico Colombini
On 25-Apr-17 08:34, Dirk Laurie wrote:
> Oops! You're right, of course. Never trust the memory of a septuagenarian.

But your memory was right on the main point: Applesoft Basic was a great
language to start with. Few instructions, a simple model (but powerful
enough for that time and hardware) and, over all, immediate visual feedback.

Having spent many years writing beginner's self-instruction courses, I
think simplicity and directness may be more important than formal
cleanliness. A disciplined mind is better than a discipline-enforcing
language.
Formal cleanliness can be taught and can be used in (almost) any
language, even if not enforced by the language itself: I used to write
structured BASIC using GOTOs (and JMP in 6502 assembly code). I was even
doing recursion without argument passing :-)

By the way, BASIC was my first encounter with the garbage collection;
its powerful, flexible strings were the main thing I missed in C.

Back to the subject: I think interactive graphics are a very effective
tool to teach programming, because they give a large amount of feedback.
Unfortunately, current-day languages (or, I should say, programming
environments) tend not to offer built-in simple graphics.
By "simple graphics" I mean no-hassle instructions that draw directly
into the output window, such as LINE. They can be used to directly
illustrate concepts, visualize data, keep attention focused and so on.

The current setup/loop graphics model is powerful but conceptually
harder to grasp for a programming beginner, especially if you are trying
to teach the first steps of procedural programming and do not want to be
distracted by concepts such as graphics frames, events, callbacks and so on.
(I know, Processing is easy to use, but not simple to master and it does
not lend itself to good programming structure... people just tend to
create lots of global variables)

--
   Enrico

1234
Loading...