Teaching Youngsters Programming

Drop in for a chat and a cup of tea

132 posts   Page 2 of 6   1, 2, 3, 4, 5, 6
by Lucretia » Tue Aug 30, 2011 10:46 am
Quote from Lerc on July 31, 2011, 13:11
I think one of the main factors for deciding what to teach will depend on memory usage. 128 meg is quite a squeeze for a lot of modern software. My email program is currently using more than that. Lua might be a good pick for lightweight. It would depend on how heavy it gets once LOVE is added to the equation.


Programmers are taught to use all available memory these days. I know I was, but for a restricted platform, you have to work differently anyway.

Many modern languages, Java, Javascript, (being 2) actually waste memory and I certainly would not choose either as a beginners language. I also wouldn't choose any C derived language, having to use pointers everywhere, really?

Luke.
Posts: 37
Joined: Sun Aug 28, 2011 10:49 pm
by NiD » Wed Aug 31, 2011 10:28 pm
Time for my two penneth. As for an IDE I use Geany, for nearly everything now, it is multi-platform and multi-language.
As for Programming, It's got to be Scratch for Primary. The pupils enjoy it so much they use it in 'Golden Time'. Google liked the UI so much they used it for the App Inventor so skills can be transfered up. It's when you get to C++, Python or Java that you get bogged down.
Posts: 1
Joined: Wed Aug 31, 2011 8:52 pm
by liz » Wed Aug 31, 2011 10:39 pm
The foundation is planning to target Python as the main teaching language (and we're hoping for some support from the University of Cambridge with learning materials); but other languages can and should be accessible on the device, and we'd love to see community-developed materials start to appear. There's stuff out there already (I've worked on some myself for the Scottish Government), but it'd be good to see more - and more that's open so that schools don't have to fork over their jealously guarded pennies for materials.
--
Head of Comms, Raspberry Pi Foundation
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 4084
Joined: Thu Jul 28, 2011 7:22 pm
by MDC » Wed Aug 31, 2011 11:16 pm
Have you asked the open university to see if they can help you in anyway (support ect)?

As they do make alot of interesting programmes and can get you really interested in a subject
Posts: 167
Joined: Thu Jul 28, 2011 6:27 pm
by jasongreen » Thu Sep 01, 2011 6:48 pm
I always found the java inherited overhead of Processing [ void setup() etc.] sort of off putting for a beginner, although I think the graphic emphasis is a plus.
Posts: 15
Joined: Fri Aug 19, 2011 2:25 pm
by obarthelemy » Thu Sep 01, 2011 7:33 pm
Scratch looks nice and very well supported. I'm a bit worried about resource use though, Scratch itself is a Smalltalk program executed in a VM. And there are no ARM ports I could find ?
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by jasongreen » Thu Sep 01, 2011 8:26 pm
How are the python graphics libraries? I remember that most of my early months of BASIC self study at around age 10 were spent trying to get an Apple IIe to draw pictures.
Posts: 15
Joined: Fri Aug 19, 2011 2:25 pm
by Lucretia » Thu Sep 01, 2011 10:50 pm
Quote from jasongreen on September 1, 2011, 21:26
How are the python graphics libraries? I remember that most of my early months of BASIC self study at around age 10 were spent trying to get an Apple IIe to draw pictures.


wxPython? Has GL I think.
Posts: 37
Joined: Sun Aug 28, 2011 10:49 pm
by manicgeek » Fri Sep 02, 2011 4:24 pm
DavidWaller wrote:
As such I was thinking of an online magazine that could be easily printed out and read off line. This could include beginners guide to programming (accepting there are many books for programming), that is particularly aimed at the RasPi, as well as more advanced topics and examples with additional hardware.

I agree with that, for the market it's aimed at and the price point it's entirely likely some kids may have one at home as well as having access through school. Making it something they can 'play' with is essential to making it work as a tool for teaching them concepts. And access to material like that at home as well as at school can only help with that.

I would suggest that it should be distributable though, you know a maillist for PDF distribution or something. It should be a PDF magazine, obtainable and readable anywhere.
Posts: 44
Joined: Tue Aug 30, 2011 5:31 pm
by Lakes » Fri Sep 02, 2011 8:28 pm
I like the idea of awarding points for attaining "levels" in programming, or winning some RasPi merchandise like a badge or mug for the best program written by children.
Posts: 267
Joined: Wed Aug 24, 2011 2:17 pm
by LucDepauw » Sun Sep 04, 2011 4:01 pm
I recently came across a Microsoft product Kudo Game Lab that has a very unqiue way to teach kids some basic programming principles by let them construct a 3D game with a visual click and program interface.
Some similar concept on the R-PI should clearly attract youngsters to get started programming. The opengl/3D support in R-PI would be nice for this. As a kid I started programming games on a ZX81, Commodore Vic20, C64 (basic, assembler, C) and I'm a IT consultant since then...
Here's the site: http://fuse.microsoft.com/page/kodu.aspx
Posts: 2
Joined: Fri Aug 19, 2011 4:57 pm
by brian » Tue Sep 06, 2011 10:32 pm
I have seen Kodu before and though it was a great tool to get kids programming. Unfortunately it has some fairly hefty graphics requirements and we couldn't use it in school because of that. I was also interested in the discussions people where having about which languages to use and whether or not it should be object orientated. My two cents worth is that from my experience of trying (rather unsuccessfully) to introduce programming to the school this isn't really the main issue.

Kids are more interested in producing something "cool" as quickly as possible, which is why things like Kodu, Scratch and, dare I say it, VB seem to work well. They allow people to get something graphical working very quickly. When I tried a more code based approach (don't know if that is the best way to phrase it - imagine starting with the universal hello world program on command line) interest waned rapidly and they stopped coming. So I agree with the previous poster and would actually go a bit further and say that the ability to rapidly develop a GUI of some sort is almost essential if you want to meet your aim of getting as many kids programming as possible. Once you get them hooked then you can start getting more technical.

In terms of the earlier discussions about when kids can start programming I have found that most of the year 7s (about 11 years old) that I had dabbling with some actionscript (so that they could move a spaceship around in a flash movie) had difficulty with just being able to break down what they wanted to do into logical steps never mind the syntax. Again something like Scratch or similar might still be an appropriate starting point at that age because it focuses them on the more important skills of breaking down what they want to do into a number of steps rather than worrying about how many brackets to close or where the next semi colon goes.

Sorry about the long post but personally I'm actually really excited at the prospect of getting the school to get some raspberry pis. After about two and a half years of nagging to get ANY programming language installed it probably represents the only way I'm going to be able to get around my network manager.
Posts: 3
Joined: Tue Sep 06, 2011 9:03 pm
by thesynapseuk » Wed Sep 07, 2011 9:26 am
I agree with Brian. I tried doing a 'Game Maker club' using Game MAker 8.0. Aside from issues like my schools rubbish IT provision and computers being swapped in and out constantly, the kids just wouldn't remember what they'd learnt from one week to the next and they had real difficulty in just getting the logic. In my mind, Game Maker is about as drag and drop as you can get before you start sacrificing power. I think Kodu has some great things about it in terms of principles, but yeah, it's limited by the hefty computer requirements plus the variety of games to be made with it is quite limited. Now the killer app could be a Kodu like application with lower graphics requirements. You could get an old XBox or Playstation 2 controller linked to a PC for very little money and I think it's this use of the the controller rather than the keyboard which is a big hook for getting into the logic of programming.
Posts: 55
Joined: Thu Jul 28, 2011 11:21 am
by obarthelemy » Wed Sep 07, 2011 10:33 am
@brian: that's really interesting. I lways have trouble gauging what kids can do at what age.
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by Shane Hudson » Wed Sep 07, 2011 2:03 pm
I like the idea of teaching children JavaScript. It is one of those languages that has become essential to the development of software (especially as it all moves online). Although it is a scripting language, it has many programming concepts (even if classes are a tad harder than normal as it is all prototypal).

It also requires no compiler, IDE, is extremely simple yet can be the best choice of language quite often and it is becoming ever more needed and important.

Seems the perfect language to me... just need a text editor and browser (chromium perhaps?).

And of course using the HTML5 Canvas, Audio and Video tags... there is not much you cannot do! I made my first game last night actually, very fun to make... once I have ironed out a few kinks I might share it.
Posts: 14
Joined: Thu Sep 01, 2011 12:40 pm
by brian » Wed Sep 07, 2011 5:19 pm
Admittedly my experiece of JavaScript is limited and have only used it within the context of a web pages. Within that context I don't think it is the best way to introduce kids to programming as it requires them to learn about HTML and CSS at the same time. I did try this when some pupils asked me to introduce them to PHP/JavaScript and it was just too many technologies for them to take on at once. Having said that if you had pupils who were already able to develop webpages it might be a good way to get the coding - I just don't think it is a good way to start with complete "novices".

I'd be interested in seeing your game by the way!
Posts: 3
Joined: Tue Sep 06, 2011 9:03 pm
by brian » Wed Sep 07, 2011 7:03 pm
Isn't it odd how sometimes you are discussing something and then out of the blue a very relevant link suddenly gets sent to you. In terms of teaching kids Javascript I think having a look at Waterbear (http://waterbearlang.com) might be worthwhile.

I haven't had much time to mess with it but it is based around the idea of bring a Scratch like development environment to other programming languages - most notably Javascript. It all appears to run in browser using HTML 5 etc. It also seems fairly simple and even lets you see the code ... something Scratch doesn't let you do. Although I have to admit I just crashed by browser by getting the termination condition of a loop wrong!
Posts: 3
Joined: Tue Sep 06, 2011 9:03 pm
by Lerc » Thu Sep 08, 2011 2:07 am
Quote from brian on September 7, 2011, 18:19
Admittedly my experience of JavaScript is limited and have only used it within the context of a web pages. Within that context I don't think it is the best way to introduce kids to programming as it requires them to learn about HTML and CSS at the same time


What I did when teaching JavaScript is to do the first lesson on getting a program in a standalone file with just the code. I provided a simple page stub which loaded helper.js and program.js. helper.js provides a set of functions for canvas drawing and so forth. program.js is the student's program.

The students never have to deal with the DOM directly.

I found out a few interesting things on the way.

None of the students knew that web pages were constructed out of human readable content, Teaching them about 'view source' had them going off to all of their favourite web sites and having a look. It was a revelation to them.

Initially I started with page1.html loading program1.js etc. I found it much better to have page.html loading program.js each in their own directory. Students then copied the entire directory and got their own copy to play with without any need for renaming..

The dynamic nature of JavaScript simplified things for the students. The notion that var x; 'made a variable and called it x' is much easier to teach than for static languages where things like that don't actually do anything but simply define context for later statements.

---
WaterBear looks interesting. A bit ugly though. I might take a look and see if it can be prettied up with just CSS changes.
Posts: 14
Joined: Sun Jul 31, 2011 6:04 am
by gbulmer » Thu Sep 29, 2011 1:20 am
I'd like to add my $0.02.
I like block-orientated visual programming languages to help get younger children, ie. 5 or 6, started. I feel they minimise the obstacle of learning syntax, and don't have the problems of flow-chart systems.

Scratch is probably the best known block-language and is built on top of Squeak, which is a portable Open Source SmallTalk VM written in C by some of the original SmallTalk team. http://squeak.org/Download/. I have not looked into it, and it will likely be some work, but poritng Squeak, and then Scratch may be within the resources of a few people for a few months to make it work. (It might work 'out of the packet' on RaspberryPi I really do not know). I wouldn't recommend spending much effort as Flash is coming (see below)
The Open University's new TU100 programming course will use Sense, an extension of Scratch (I was part of the team who designed the SenseBoard). Sense is designed to support undergraduate teaching, and so has some extra concepts beyond Scratch.
The other Scratch related block-language is Snap, AKA BYOB, http://byob.berkeley.edu/ which is also fork of Scratch. Snap let's you create new blocks, which is an important idea not available in Scratch. Snap is also used for undergraduate teaching. So I don't think children need feel they are using a 'toy' language.

The last time I looked, the Scratch team are working on a new implementation of Scratch in Flash, which will run in the browser. I believe there may be other work to produce something similar, but using JavaScript. There are JavaScript pieces of technology to build an interpreter running in the browser available as Open Source from the Scratch team

I have done JavaScript programming experiments using Rhino http://www.mozilla.org/rhino/ which is a command-line environment, and is not embedded in a browser. So you can write the classic 'hello world' program without any skulduggery to hide the browser. Though I like the JavaScript debugging tools in the browsers, Rhino makes stuff simpler. Rhino is written in Java, and lets you get at the Java libraries, but I think that is a lot of hassle for a new programmer.

I really wasn't 'into' JavaScript until I read "JavaScript: The Good Parts" by Douglas Crockford http://www.amazon.co.uk/JavaSc.....0596517742. IMHO it is worth a read if you are a CS person.

Now that SVG is integrated into popular web browsers, there is an opportunity to use drawing tools to create SVG, and use JavaScript to produce animations where all of the component parts are 'visible'. This might make coordinate geometry more fun and interesting. It is feasible to make very interesting animated user interfaces this way.
Posts: 52
Joined: Wed Sep 28, 2011 9:11 pm
by asb » Thu Sep 29, 2011 6:59 am
Quote from gbulmer on September 29, 2011, 02:20
I'd like to add my $0.02.
I like block-orientated visual programming languages to help get younger children, ie. 5 or 6, started. I feel they minimise the obstacle of learning syntax, and don't have the problems of flow-chart systems.

Scratch is probably the best known block-language and is built on top of Squeak, which is a portable Open Source SmallTalk VM written in C by some of the original SmallTalk team. http://squeak.org/Download/. I have not looked into it, and it will likely be some work, but poritng Squeak, and then Scratch may be within the resources of a few people for a few months to make it work. (It might work 'out of the packet' on RaspberryPi I really do not know). I wouldn't recommend spending much effort as Flash is coming (see below)


Squeak (and Scratch, byob) runs, but there's optimisation work to be done. I have a strong personal interest in getting it to run better. I haven't tried etoys yet but I'm sure that will also work fine.

Here's photographic evidence!

http://rorycellan.posterous.co.....ry-pi-fina
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 795
Joined: Fri Sep 16, 2011 7:16 pm
by gbulmer » Thu Sep 29, 2011 3:47 pm
Quote from asb on September 29, 2011, 07:59
Squeak (and Scratch, byob) runs,

Excellent :)
I had assumed it would be quick (day or two at most), or quite a lot of work.
How long did it take?
Is everything working correctly?
When do you think it will be available and usable?
but there's optimisation work to be done

What are you trying to optimise?
Posts: 52
Joined: Wed Sep 28, 2011 9:11 pm
by asb » Thu Sep 29, 2011 4:12 pm
Quote from gbulmer on September 29, 2011, 16:47
I had assumed it would be quick (day or two at most), or quite a lot of work.
How long did it take?
Is everything working correctly?
When do you think it will be available and usable?


It was trivial (thanks to Debian). Some searching showed Debian developer Miriam Ruiz had already produced ARM packages for the platform-dependent plugins used by Scratch. So I pretty much just installed it and it worked. As far as I know everything works correctly, but I haven't done much testing outside of running the included examples.

What are you trying to optimise?


Well, although it runs it can be somewhat sluggish (particularly some graphics operations), as all blitting is done in the CPU. I have a different Raspberry Pi project which is my focus right now, but I do intend to return to this and look at offloading these graphics operations to the GPU. I'll be sure to keep you forum-goers updated. I think that's the major bottleneck, but once that's out of the way you might be able to squeeze some more performance my compiling Squeak VM and dependencies with hardware floating point support.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 795
Joined: Fri Sep 16, 2011 7:16 pm
by gbulmer » Fri Sep 30, 2011 4:21 pm
Quote from asb on September 29, 2011, 17:12
Quote from gbulmer on September 29, 2011, 16:47
...
How long did it take?
Is everything working correctly?
When do you think it will be available and usable?


It was trivial (thanks to Debian). Some searching showed Debian developer Miriam Ruiz had already produced ARM packages for the platform-dependent plugins used by Scratch. So I pretty much just installed it and it worked. As far as I know everything works correctly, but I haven't done much testing outside of running the included examples.

Well, there's something for folks to check out, excellent result!

Quote from asb on September 29, 2011, 17:12
What are you trying to optimise?


Well, although it runs it can be somewhat sluggish (particularly some graphics operations), as all blitting is done in the CPU. I have a different Raspberry Pi project which is my focus right now, but I do intend to return to this and look at offloading these graphics operations to the GPU. I'll be sure to keep you forum-goers updated. I think that's the major bottleneck, but once that's out of the way you might be able to squeeze some more performance my compiling Squeak VM and dependencies with hardware floating point support.

Ah! I can imagine it might be CPU blitting, though the original Acorn RISC machines were incredibly slow compared to R-Pi, and they had very smooth graphics.

What are the profiling tools like for R-Pi? Is it practical to see where time is spent? I realise profiling an interpreter is non-trivial.
Posts: 52
Joined: Wed Sep 28, 2011 9:11 pm
by asb » Sat Oct 01, 2011 7:19 pm
Quote from gbulmer on September 30, 2011, 17:21
Ah! I can imagine it might be CPU blitting, though the original Acorn RISC machines were incredibly slow compared to R-Pi, and they had very smooth graphics.

What are the profiling tools like for R-Pi? Is it practical to see where time is spent? I realise profiling an interpreter is non-trivial.


I haven't tried it, but I believe oprofile works with ARM11. I've also had luck with callgrind (from Valgrind) on x86, and I think the latest version support ARM. Otherwise there's gprof. You're right that for profiling time inside Smalltalk code you'd probably want to look at a Squeak VM profiling tool.

Basically the profiling situation is the same as for any other ARM device running Linux. It's possible the Broadcom GL stack has some profiling hooks, but that's only useful if you're already using GLES/OpenVG/whatever to offload to the GPU.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 795
Joined: Fri Sep 16, 2011 7:16 pm
by Petr » Sun Oct 09, 2011 10:03 am
Some easy accessible hardware is IMHO necessary.
What about something like [embed]feature=player_embedded[/embed]

I can not wait to get few of Rpi for Christmas
Posts: 9
Joined: Sun Oct 09, 2011 8:51 am