Teaching Youngsters Programming

Drop in for a chat and a cup of tea

132 posts   Page 4 of 6   1, 2, 3, 4, 5, 6
by clivef » Sun Nov 13, 2011 9:10 am
Quote from Galaak on November 13, 2011, 00:30
Quote from clivebeale on November 12, 2011, 19:22

In the meantime, here is my favourite code from when I started learning Python.
[snip]


I'm not sure I would begin with that code for a kid. ...
You wouldn't - it contains several abstract concepts that need to be learned first. The point was that you can do exciting stuff in two lines of code :D
Posts: 67
Joined: Thu Oct 27, 2011 1:40 pm
by clivef » Sun Nov 13, 2011 9:29 am
Quote from Galaak on November 13, 2011, 00:52
Quote from clivebeale on November 12, 2011, 19:22
The audience is different now and it will be a long haul, but it will be worth it.


Is the audience that different ? Even if some things change, kids still like Playmobil, Lego, Barbie, bikes, cars, ...
If a fondness for play was all it took the Raspberry-Pi wouldn't be needed.

It's all about the use of technology - young people are heavy technology consumers. We (edcuators/government/industry etc) would like more of them to be technology creators. This requires access to resources and support (like the Ras-Pi) but it will also require a fundamental change in the education system (UK). And as a teacher I know that, yes, it will be a very long haul. But things are afoot and I'm rolling up my sleeves. :D
Posts: 67
Joined: Thu Oct 27, 2011 1:40 pm
by Galaak » Sun Nov 13, 2011 9:54 am
Quote from clivebeale on November 13, 2011, 09:10
Quote from Galaak on November 13, 2011, 00:30
Quote from clivebeale on November 12, 2011, 19:22

In the meantime, here is my favourite code from when I started learning Python.
[snip]


I'm not sure I would begin with that code for a kid. ...
You wouldn't - it contains several abstract concepts that need to be learned first. The point was that you can do exciting stuff in two lines of code :D



Ok, I understand your point now, thanks :-)
Posts: 14
Joined: Sat Nov 12, 2011 4:44 pm
by jamesh » Sun Nov 13, 2011 10:36 am
The Python excerpt and any 'amazing stuff in only a few lines of code' seem to me to be the wrong approach. It doesn't give the person typing it in the vaguest clue of what is actually going on.

As the indentation vs curly braces...Hmm....if you get indentation wrong it goes pear shaped (at run time?) if you get curly braces wrong it goes pear shaped (at compile time). Pretty much the same issue IMHO. Also, indentation is infrequently use in programming languages, where as block start end end syntax is commonly used (begin, end, {..} etc)

This whole topic generally does show how difficult it is to come up with the 'one true way'.

Because there isn't one.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12158
Joined: Sat Jul 30, 2011 7:41 pm
by Galaak » Sun Nov 13, 2011 10:57 am
Quote from clivebeale on November 13, 2011, 09:29
If a fondness for play was all it took the Raspberry-Pi wouldn't be needed.


You're right, but I'm pretty sure you'll agree it implies several factors. On my opinion the main problem is about computers stopped being accessible for kids. The concept of breakable cheap computer with the RasPi is fantastic. In fact I don't plan to buy one but three (one for me two for my kid).


It's all about the use of technology - young people are heavy technology consumers. We (educators/government/industry etc) would like more of them to be technology creators. This requires access to resources and support (like the Ras-Pi) but it will also require a fundamental change in the education system (UK). And as a teacher I know that, yes, it will be a very long haul. But things are afoot and I'm rolling up my sleeves. :D


Yes, but I'd like to underline an important point. Not every people using a RasPi will be teaching to club or school. I want to teach to my nephews and son. And me and my brothers have some control about the way our children use technology, specially about consuming and creating, so we can teach them things a bit differently. For instance I prefer to start with simple electronic circuits and play with batteries and light bulbs and customize a Playmobil toy with lights or engines (to open and close doors) before touching a computer.

I know you have constraints as a teacher, and that you have to adapt to a large audience. My wife is a teacher and I am an engineer creating software for artists and training them, and also teaching other engineers how to program and design software for artists. You definitely don't use the same ways to teach depending on the size and culture of your audience, when you're in a situation where you can split your audience. But I know it's not possible at school.

As a French guy who lives in London for 5 years, I don't know enough about the UK school system to comment on it, but there's one thing I noticed. In France being an engineer is a big social pride. I do not feel it is the case in UK, specially when I hear some Alan Sugar comments about engineers or when I heard my former boss surprised I am proud to be an engineer. Is it simply my experience or do you feel engineering is not enough socially appreciated in UK ? For instance in France being an entrepreneur is not enough socially appreciated and it reflects in the school system. At the end France miss people willing to create companies.
Posts: 14
Joined: Sat Nov 12, 2011 4:44 pm
by Galaak » Sun Nov 13, 2011 11:04 am
Quote from jamesh on November 13, 2011, 10:36
The Python excerpt and any 'amazing stuff in only a few lines of code' seem to me to be the wrong approach. It doesn't give the person typing it in the vaguest clue of what is actually going on.

As the indentation vs curly braces...Hmm....if you get indentation wrong it goes pear shaped (at run time?) if you get curly braces wrong it goes pear shaped (at compile time). Pretty much the same issue IMHO. Also, indentation is infrequently use in programming languages, where as block start end end syntax is commonly used (begin, end, {..} etc)

This whole topic generally does show how difficult it is to come up with the 'one true way'.

Because there isn't one.


I love what you say, better said than me : there is not one true way. So please don't forget the 8 bits approach, some people will (at least try to) make good use of it.

Thanks again and again for your post.
Posts: 14
Joined: Sat Nov 12, 2011 4:44 pm
by bradburts » Sun Nov 13, 2011 11:20 am
Quote from jamesh on November 13, 2011, 10:36
As the indentation vs curly braces...Hmm....if you get indentation wrong it goes pear shaped (at run time?) if you get curly braces wrong it goes pear shaped (at compile time). Pretty much the same issue IMHO..


I would rather have the compiler moan than have the logic screwy.
If you miss a brace then the compile error will stop you flat, whereas wrong indentation will produce strange results.
Think Python might catch a few beginners on that point (does me!)
In a similar way I always compile 'C++' with '-wall'. Pain in the butt to remove all the warnings but easier to have to remove 10 silly warnings and one true error than have to find the error latter!

This whole topic generally does show how difficult it is to come up with the 'one true way'.
Because there isn't one.


Absolutely agree.
The RPI is great though as it allows you to use a modern scripting language in an embedded context whereas previously you would have to use C or assembler.
A scripting language is a little easier in that the results are a little more immediate, you can type at the console and see what happens. Compilation either using IDE or make is another step removed and perhaps slows results/reward sufficiently to turn a few away.
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am
by clivef » Sun Nov 13, 2011 3:33 pm
Quote from jamesh on November 13, 2011, 10:36
The Python excerpt and any 'amazing stuff in only a few lines of code' seem to me to be the wrong approach. It doesn't give the person typing it in the vaguest clue of what is actually going on.
The Python thing was a tongue in cheek comment not a pedagogical axiom or nuffin :D

But like you say, there is no best or right or wrong. I was asked the other day why CAS picked Python for their user manual and the only real answer is "because we didn't pick any of the other languages".
Posts: 67
Joined: Thu Oct 27, 2011 1:40 pm
by clivef » Sun Nov 13, 2011 3:43 pm
Quote from Galaak on November 13, 2011, 10:57
Yes, but I'd like to underline an important point. Not every people using a RasPi will be teaching to club or school. ...
Which is exactly why there will be a user manual available when the second phase is launched next year. I'm a parent first and a teacher second ;)
Posts: 67
Joined: Thu Oct 27, 2011 1:40 pm
by AlanCox » Mon Nov 14, 2011 3:48 pm
The PI ought to be able to run things like sugar which may also be quite interesting as an experiment, and as an environment now getting a lot of exposure on OLPC. The OLPC runs a sugar based environment in 256MB combined with a gecko derived browser and abiword rather than libreoffice. The latter really is a bit big for a 256MB box with a ton of other stuff loaded on it, although I suspect it would be fine with a lightweight environment like E
Posts: 31
Joined: Thu Nov 10, 2011 7:11 pm
by kme » Mon Nov 14, 2011 4:01 pm
Rather than Abiword I'd suggest TED as its native document format is RTF, which currently is the closest to a universal document format. Absolutely not perfect, but what is? TED has many localized versions too. Might be important to kids not too skilled into English.
http://www.nllgg.nl/Ted/
Posts: 448
Joined: Sun Sep 04, 2011 9:37 am
by antiloquax » Sun Nov 20, 2011 11:57 am
As I have posted on other threads, I am a teacher hoping to start a programming club. I am getting to know Python 3 using Michael Dawson's "Python Programming for the Absolute Beginner". I'd be interested in hearing other people's experiences.
I agree with the OP about installation - I have got Active Python 3 on my Wary Puppy 3.2.2 Linux-box. Eventually. I tried quite a few other options before I managed to get this to fly ...

thanks,
mark
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
by kaplan » Sun Nov 20, 2011 1:40 pm
Are there any lightweight and simple IDE / compilers out there for Linux or even RisOS? Borland turbo pascal and QuickC sort of thing.
Posts: 3
Joined: Sat Nov 12, 2011 10:44 am
by Scribe » Sun Nov 20, 2011 1:56 pm
Quote from kaplan on November 20, 2011, 13:40
Are there any lightweight and simple IDE / compilers out there for Linux or even RisOS? Borland turbo pascal and QuickC sort of thing.


CodeBlocks or Notepad++ to a lesser extent (for the roll of IDE at least).

Interestingly the guys on BeagleBoard.org are in the process of integrating web-based cloud9 IDE into their systems with Node.js that allows for generation of responsive webpage javascript applications with hardware feature interaction. As this evolves it could become a very promising entry point and be great for prototype jobs.
Posts: 98
Joined: Wed Sep 28, 2011 12:00 pm
by kaplan » Sun Nov 20, 2011 2:45 pm
Individually, a separate editor, compiler, debugger etc may well be the best for an experienced developer. But for novices, which the Raspberry Pi is aimed at (happy to be corrected on this one) surely a single simple dev environment is better? Or can things be packaged so that essentially it's seamless?
Posts: 3
Joined: Sat Nov 12, 2011 10:44 am
by Scribe » Sun Nov 20, 2011 2:53 pm
Quote from kaplan on November 20, 2011, 14:45
Individually, a separate editor, compiler, debugger etc may well be the best for an experienced developer. But for novices, which the Raspberry Pi is aimed at (happy to be corrected on this one) surely a single simple dev environment is better? Or can things be packaged so that essentially it's seamless?


Linux is highly modular and so it's easy to obtain separate packages with single commands. Often IDEs will be already set-up to use the default compilers, however if not, it's relatively easy for a teacher to perhaps look at creating a single command script to download all necessary packages and edit an IDE's config, essentially setting up the entire process. What's great about an IDE for newcomers is that it provides unified access to the compiler, debugger etc.

I'm expecting, however, that at least one of the official RaspberryPi images will in fact come bundled with a configured IDE. I could be wrong though.

If you're looking for an all singing all dancing IDE with engines and scripting all as one package then be careful, as these can consume a lot of resources, which may struggle with the 128MB educational A board.
Posts: 98
Joined: Wed Sep 28, 2011 12:00 pm
by hawkwolf » Thu Nov 24, 2011 11:26 am
Posts: 3
Joined: Thu Nov 24, 2011 11:20 am
by jamesh » Thu Nov 24, 2011 12:10 pm
Quote from hawkwolf on November 24, 2011, 11:26
http://www.greenfoot.org/door


OK, you've made three posts since you joined the forum, all containing exactly the same link with no explanation. Care to elaborate, or are you just an advertising shill?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12158
Joined: Sat Jul 30, 2011 7:41 pm
by boley » Thu Dec 01, 2011 7:18 am
I found the LiveWires Python Programming course to be a pretty good introduction to Python. I believe it has a pretty good track record with getting young people interested in programming. http://www.livewires.org.uk/python/home
If I were planning to teach a class, I would certainly study their approach. The materials are free. Incidentally the creators are located in the UK.
Posts: 48
Joined: Wed Nov 30, 2011 9:50 pm
by boley » Thu Dec 01, 2011 8:31 am
I'm curious if there is any interest in introducing programming to youngsters using a backdoor approach. PictureScript (an experimental but practical tool) uses a text messaging metaphor for creating and controlling objects, where typing anything reasonable gives a result, and you simply send a followup message to adjust that result. One way I have described it is "you are coaching the machine" or helping it understand what you want.

PictureScript grammar goes a bit beyond the which is harder for beginners, brackets or indention debate, and pretty much throws syntax out the door. A message is analogous to a statement in a command line language. A "program" is simply a collection of messages, that can be sent to a single or set of objects in the proximity. It certainly breaks a lot of "good programming" rules, but on the other hand it is intuitive OOP.

We specifically developed it for people who are adverse to programming in the conventional sense, but needed to get something done, not really with the idea of turning them on to programming. There is a video at the link that demonstrates the basic concept by building a simple coloring book type app, and some other info. http://www.technologicalservic.....turescript

Anyway, just curious if anyone thinks this approach might be a painless way to introduce children to programming. If the idea has merit we might open source it as a Python app for the Raspberry Pi.

I apologize in advance to any serious computer scientists or professional programmers it might offend. :-)
Posts: 48
Joined: Wed Nov 30, 2011 9:50 pm
by tufty » Thu Dec 01, 2011 10:05 am
That's very interesting. Note - I am a computer scientist and professional programmer, and I'm not at all offended. Well, except by this bit:

A "program" is simply a collection of messages, that can be sent to a single or set of objects in the proximity. It certainly breaks a lot of "good programming" rules,

because it doesn't break programming rules at all. Or, at least, not any good ones.

You might want to look at Carl Hewitt's work on Actors, it should fit in quite nicely with what you're doing.
Posts: 1373
Joined: Sun Sep 11, 2011 2:32 pm
by meltwater » Thu Dec 01, 2011 2:23 pm
PictureScript looks quite fun, particularly since it short circuits the whole write a program and then test cycle. I can see that setting something up like the tutorial colouring book is a lot easier to face step by step than trying to write a sequence in code and then testing only to find it doesn't do it how you thought.

It also introduces the concept of procedural order very strongly which is essential for any programmer to understand. It is something I think will be great on the R-Pi. One issue which I have with it is the references to the objects, which for my liking is a little woolly (I know this is intentional [Update: I've been informed that you can reference them by description, name them and relative to other objects --- so lots of ways to do it] ) but I'd be interested to have a play with it and see myself.

Also, although it probably goes against the current thinking, drag and drop of objects is natural to kids now [they prod and poke at screens all the time], so later on a tool bar and moveable objects could add to the usability (even if it just creates a similar script - add circle, move up and left - with the details of the dragging and dropping y=y+20, x=x-10 still hidden away).

I could see my 4 year old being able to follow and understand this (as long as I read and type for her).
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam
User avatar
Posts: 994
Joined: Tue Oct 18, 2011 11:38 am
by boley » Thu Dec 01, 2011 3:55 pm
Quote from tufty on December 1, 2011, 10:05
You might want to look at Carl Hewitt's work on Actors, it should fit in quite nicely with what you're doing.


Thanks, I've been exposed to the Actor model in various ways over the years and I'm sure that Carl Hewitt has influenced several projects I've worked on indirectly, but until you put the two together for me I did not realize how much formal documentation of the ideal Actor model exists, as opposed to documentation and examples of systems that use the model. This will help me use better terminology when discussing these concepts on a deeper level beyond the target audience.
Posts: 48
Joined: Wed Nov 30, 2011 9:50 pm
by boley » Thu Dec 01, 2011 4:31 pm
Quote from meltwater on December 1, 2011, 14:23
... One issue which I have with it is the references to the objects, which for my liking is a little woolly (I know this is intentional) but I'd be interested to have a play with it and see myself...


I like your term "wooly" references, I have been using "fuzzy". You are correct it is intentional and often the best way to reference as it makes the messages more portable or reusable. You can give the objects names or use the automatically assigned unique ids for reference, just as it is useful to sometimes call out into a crowd of kids by name.

Quote from meltwater on December 1, 2011, 14:23
Also, although it probably goes against the current thinking, drag and drop of objects is natural to kids now [they prod and poke at screens all the time], so later on a tool bar and moveable objects could add to the usability (even if it just creates a similar script - add circle, move up and left - with the details of the dragging and dropping y=y+20, x=x-10 still hidden away).

I could see my 4 year old being able to follow and understand this (as long as I read and type for her).


In some implementations, like the example where there is a graphical interface, interaction with tools is natural, although I'm struck by how many people are better at manipulating visual objects with words than tools. One of our internal discussions has been "is it better for visual objects to be moveable and malleable by touch as soon as they are created or require that touch be enabled." One thought is to add an adjective when the object is created: "Make a draggable blue circle" or "Make it draggable". In any event, you can create a palette of tools just as the pallet of colors were created in the coloring book example. I'm sure we'll eventually have a collection of "texts" that can be used to set up common GUI interfaces.

Another wooly concept is moving or sizing things by adjectives rather than hard numbers. While you can use hard numbers "Make its width 100", "Make it wider" or "Make it a little wider" is more common. The hard number equivalent changes depending on the context. This makes the message effects scale automatically.

Thanks for the encouragement. If you fill out the the form on our website, we'll let you know early when there is external copy to play with. However I imagine I'll be distracted playing with my RPi for a while. :-)
Posts: 48
Joined: Wed Nov 30, 2011 9:50 pm
by Petrakis » Fri Dec 02, 2011 1:14 am
If the kids are too young a text output from a console won´t be interesting for them.

Kids need something catchy.

What about Laby? Can be used with Python and other languages that I cant remember´.
http://ubuntulife.files.wordpr.....by_017.png (With the image is self-explanatory :) )

or KTurtle
Posts: 18
Joined: Thu Dec 01, 2011 11:48 pm