CommanderCoder
Posts: 20
Joined: Tue Aug 30, 2011 7:17 am
Contact: Website

Re: Children programming the Raspberry Pi

Wed Aug 31, 2011 12:06 pm

I've been watching the Raspberry Pi grow since I first heard of it in January this year. I'm extremely looking forward to getting my hands on one in November. It reminds me of the excitement I had as I waited to get a BBC Model B back in November of 1981. (At the bargain price of £335; how did my dad afford it?)

I have two children of my own now, just approaching secondary school age and they have no interest in programming, much to my dismay. I think that the reason I got so much from programming my BBC B was due to two factors (mentioned in another post). Firstly, as far as I knew at the time, it had a simple and single programming interface (i.e. BBC Basic) and secondly, it came with a manual that had some examples of how to make beeps and draw triangles. Everyone that used a BBC micro demonstrate what they had learned quickly to their friends on any BBC Micro (even at school).

The Raspberry Pi has that same potential and that is what excites me. I have a concern however, that the RaspPi does need something printed with which children can sit and learn. I'm basing this on my experience with my children. Even though we live in an age of digital information, my children still prefer to use books for learning. Mainly because it is so portable and cheap (if from the library). If the RaspPi is designed to be cheap we cannot assume that the consumers will have internet access, a Kindle or other digital sources for instruction.

A quick search on Amazon shows a couple of books designed for Python programming with children but I think a book designed specifically for "Python* on the Rasberry Pi" that is really fun and engaging will go down a storm. Who's with me? I would consider writing it myself but I have no idea how difficult or time consuming writing a book would be. I only know how hard it was writing my PhD thesis. There are others chatting about this kind of thing on the forum (here, here) so there should be some support out there.

* I've chosen Python here as it is interpreted and quite easy to learn. I don't want to get into a language war but I wouldn't use BASIC personally (in the modern age!) I do like the idea of using Javascript from within a browser. There are plenty of debugging tools in browsers and knowledge of Javascript & HTML 5 looks like it will be a very employable in the future. Take a look at Codecademy for a great way of learning that I'd like to see 'offline' on the Raspberry Pi (if they were interesting in making it available).

hsalonen
Posts: 19
Joined: Wed Aug 31, 2011 9:11 am
Contact: Website

Re: Children programming the Raspberry Pi

Wed Aug 31, 2011 12:49 pm

I only did MSc thesis, which was ~100 pages (including all the stuff). And it was not "with honors", because my English was.. below average on first drafts.

Anyway, it would be more beneficial to create a framework/platform for the children and use some higher level scripting language on top of that. The work required to initialize the screen and display some sprites is quite time consuming and most kids would probably just copy paste the code without ever even trying to understand the inner workings of it.

I am thinking something that you can code PONG with around 20 lines of code. Possibly C/OpenGL engine and LUA scripting frontend. And LUA would be used for programming.

The languages need to be really high level and easy to understand. Then creativity takes care of the rest.

Then again, such engine would be suited for single use, and would not advance anyone's skills in general use programming languages. It would however, teach children about data structures, variables, loops and program flow in general.

I wouldn't subject anyone to debugging with professional programming tools, that would probably leave them wanting to leave the class room screaming.

I used to be a university level undergraduate researcher in programming and data structures. The real trick is to involve the students and have them create something they find useful. I am not sure if console program outputting "Hello, world!" would be that.

vadsamoht
Posts: 19
Joined: Mon Aug 29, 2011 10:16 am
Contact: Website

Re: Children programming the Raspberry Pi

Wed Aug 31, 2011 10:16 pm

I think the only real problems with this idea lie in choosing a language and format. Trying to avoid an argument on the different types of languages, I'd agree that Python is probably the way to go, however there are a large number of pepole who are less than enthusiatic about the language.

Finding the right way to deliver the information is the other problem, as you would need what is probably a PDF or DJVU file, which has the immediate drawback that people are always reluctant to read things on the screen and printing out huge amounts of pages would no doubt be less than ideal.

Also, assuming that this is for people relatively new to computers, you will need a quite comprehensive guide that covers essentially all of the basic operation (or basic enough to program effectively with), which will be OS-dependent and require either a 'reccomended distibution' or multiple guides.

jasonl
Posts: 21
Joined: Tue Aug 30, 2011 8:26 am

Re: Children programming the Raspberry Pi

Wed Aug 31, 2011 11:29 pm

SD cards are cheap - there's no reason why a simple guide or book about programming the Raspberry Pi shouldn't come with a custom distribution matching the text. The setup part will be - plug in supplied SD card, plug in Raspberry. Wait 30 seconds, type 'ipython' or what-have-you. Exercise 1.....type print "I like pi"
I like Python, too. It's easy to learn the basics, and it's very powerful and extensible with the various libraries you can import. It's also widely used and supported around the world.

garryg
Posts: 21
Joined: Wed Aug 31, 2011 5:37 pm
Location: Scotland
Contact: Website

Re: Children programming the Raspberry Pi

Wed Aug 31, 2011 11:41 pm

Modern languages are rubbish for learning on… and I’m a .net applications developer ;)

I’d still say something properly structured and non-object-orientated like good old Pascal is a good bet for teaching.

Now I’m going to get rotten fruit (and or bricks) thrown at me aren’t I!?

tnelsond
Posts: 120
Joined: Sun Aug 07, 2011 4:35 pm
Contact: Website

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 2:00 am

I actually learned programming from Python. It was quite difficult actually, maybe I didn't have very good learning sources though. Python is interesting with its very plentiful features.

I think Lua would be great, and once they learn Lua, they can learn C and easilly integrate Lua into their programs as a scripting language. But I guess Lua isn't quite as powerful (read: bloated) as Python. But I just love how easy it is to combine C and Lua.

garryg
Posts: 21
Joined: Wed Aug 31, 2011 5:37 pm
Location: Scotland
Contact: Website

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 9:12 am

C (non object-orientated stuff) is actually ok, if you learn to program it properly. Unfortunately, like the old basic, it’s far too easy to program badly in C. It allows you to do too much.

I was being, more or less, serious. Modern languages are designed to ‘get stuff up and running’ and very often rely on huge libraries of ‘black box’ routines.

I just don’t think that’s the way to teach kids the principles of programming!
Am I just old fashioned? I don’t think so. Pascal and its ilk taught proper structured programming techniques and they didn’t rely on ‘quick fix’ predefined procedures.

Ben Timms
Posts: 1
Joined: Thu Sep 01, 2011 8:43 am

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 9:47 am

It'd be great to have something like LOGO http://en.wikipedia.org/wiki/L....._language) on the Raspberry Pi, as its primary aim is education and it's a very visually rewarding language, i.e. you can see your results.

vadsamoht
Posts: 19
Joined: Mon Aug 29, 2011 10:16 am
Contact: Website

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 10:09 am

^ Alice and Scratch are used as educational programming languages as well, however there is a very messy debate about which (if any) of those are actually good educational tools.

Going back to the original idea of writing some sort of document, my vote would lean more towards Python or Lua, but I don't want to start another holy war.

User avatar
DemonJim
Posts: 16
Joined: Thu Sep 01, 2011 2:19 pm
Location: UK
Contact: Website

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 4:07 pm

LOGO was indeed designed as a way to teach programming to children in a fun, immediate and rewarding way - the RasPi would benefit immensely having this as standard.

I'm such a believer in LOGO I've actually been working on a 3D Logo compiler for iOS (iPhone/iPad) for the very same reason the Raspberry Pi was conceived - i.e. to teach programming to kids who these days are all understandably put off by the mountain of hurdles needed to write even the simplest thing. Simply typing 10 print "Hello World" 20 goto 10 two seconds after booting up it is not! When it should be.

Logograph is like standard LOGO but you have Up and Down commands (pitch) to move around in 3-dimensions, and can also draw filled polygons and actually move around your shapes in 3D space after you've drawn them (It's not released so no this isn't a shameless plug for it!)

I'm going to investigate what will be required to port this to the Linux platform (as well as get the iOS project actually finished!). See http://www.demonstudios.com for more info (click the Logograph tab).
DemonStudios Ltd | Indie Game Developer | www.demonstudios.com

tnelsond
Posts: 120
Joined: Sun Aug 07, 2011 4:35 pm
Contact: Website

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 4:23 pm

There's nothing stopping Lua or Python from doing graphics. In fact, in a different thread I presented a logo-like turtle drawing program I made for lua: http://www.raspberrypi.org/?pa.....038;t=97.0.

EDIT:
The code is not magnificent or bug-free, but it was easy to make.

Shane Hudson
Posts: 14
Joined: Thu Sep 01, 2011 12:40 pm

Re: Children programming the Raspberry Pi

Thu Sep 01, 2011 5:51 pm

As someone that is going to University in September and has been through the early stage programming lessons... programming languages for young people are terrible. Sure, you might be able to draw a square, but the only thing they teach which might be useful later on is flow charts and very basic logic.

CommanderCoder
Posts: 20
Joined: Tue Aug 30, 2011 7:17 am
Contact: Website

Re: Children programming the Raspberry Pi

Fri Sep 02, 2011 1:21 pm

Python has LOGO built in, via the turtle library. In IDLE or similar try typing

>>> from turtle import *
>>> forward(100)

Seven Ways to Use Turtle

andrewwaite1
Posts: 2
Joined: Wed Aug 10, 2011 3:10 pm

Re: Children programming the Raspberry Pi

Mon Sep 05, 2011 1:02 pm

I grew up learning to program in first Sinclair and then BBC Basic on my ZX81 and Acorn Electron. I wrote a game that was published in ElectronUser Magazine (SANTA'S SLEIGH / http://www.acornelectron.co.uk.....-e403.html) :-)

I have used Pygame (http://pygame.org/) to write programs with Python on my PC. It has lots of nice graphics extensions to draw shapes, bitmaps and sprites on the screen.

A modernized version of BBC Basic would, in my view, be more appropriate for children starting out today. The syntax of Python (and Pygame), although simpler than many other languages still makes for a bigger barrier to getting started. Once started on Basic they can move on to other languages.

garryg
Posts: 21
Joined: Wed Aug 31, 2011 5:37 pm
Location: Scotland
Contact: Website

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 1:34 pm

I think something graphics-centric like the Dark Basic games-design language would be a good introduction, as children are now more used to immediate access to ‘flashy graphics’

bnolsen
Posts: 76
Joined: Sat Aug 13, 2011 5:37 pm

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 2:50 pm

Frankly there's nothing wrong with the *old* basic that required line numbers to be typed in. Granted it's extremely verbose, but it drives the first point home to kids being: Computers are procedural machines. Although basic is NOT structured programming, the goto statements, etc are *very* clear. *AND* you can always tell a child: let's look at "line 20" and it's clear as day on their screens what they are looking at.
Yeah, no way no how is anyone going to use this old basic to do production level stuff, but it's designed to be a teaching tool about BASIC concepts (as it should be). Resurrect Basic and resurrect the old texts used in the 80s.

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 2:56 pm

I find dumber languages more accessible indeed, maybe because I am dumb myself (and very procedural in my real life), or maybe because that's what I was taught way back when, and since then my brain has become sclerotic, and my motivation has been transfered to other things. And evaporated ^^
So actually, there might be the risk that once you start to structure kids' brains to work with procedural languages, you make it so much harder for them to switch to object-oriented ?

rjw57
Posts: 33
Joined: Wed Sep 07, 2011 1:21 pm
Contact: Website

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 3:01 pm

Quote from bnolsen on September 7, 2011, 15:50
Frankly there's nothing wrong with the *old* basic that required line numbers to be typed in.

True. It'd be nice, however, if the language that they start learning in was capable of being used right up to "real" programs. On the old BBC, in principle, the same BASIC language could be used to write programs you could actually sell/would use in the real world. This certainly encouraged me on to learn more. I don't think I wrote anything other than BBC BASIC for around 7 years before learning something different.

Python can scale like that all the way from a simple one-thing-after-the-other language all the way up to writing complex GUI apps.

In fact, I just hacked 400 lines of Python module to replicate the instant gratification of all those graphical BBC BASIC doodles I did as a child:

Edit This is very much like Processing aims to do with Java, but teaching Java should be viewed as child abuse ;).


CommanderCoder
Posts: 20
Joined: Tue Aug 30, 2011 7:17 am
Contact: Website

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 3:21 pm

That is really cool. I want to work out how to make SOUND work. Everything I've seen seems to be "wav" driven and it is really hard to find something that just generates tonal frequencies.

rjw57
Posts: 33
Joined: Wed Sep 07, 2011 1:21 pm
Contact: Website

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 3:28 pm

So actually, there might be the risk that once you start to structure kids' brains to work with procedural languages, you make it so much harder for them to switch to object-oriented ?

Funnily enough I think this is the biggest mental hurdle that one has in programming. When you first starts, programs are lists of instructions to be followed. As you mature, you realise that programs are data structures which are manipulated.

Programming is, to some degree, very applied mathematics. Lists, object, sets, processes, co-routines, RPC mechanisms, etc are all quite high-level abstract mathematical entities. They may be entities which map more-or-less well onto computing hardware, but abstractions they remain.

Before you can appreciate working with objects, or any other far-from-the-metal paradigm, you need to have learned the programming equivalent of arithmetic, fractions and algebra.

rjw57
Posts: 33
Joined: Wed Sep 07, 2011 1:21 pm
Contact: Website

Re: Children programming the Raspberry Pi

Wed Sep 07, 2011 3:34 pm

Quote from CommanderCoder on September 7, 2011, 16:21
That is really cool. I want to work out how to make SOUND work. Everything I've seen seems to be "wav" driven and it is really hard to find something that just generates tonal frequencies.

I might clean it up and throw it on github then. Python can, with appropriate modules installed, generate sound and there's no real reason why it can't be similarly wrapped with BBC BASIC-alike SOUND commands.

One could even replicate the dark magic of ENVELOPE. Or, possibly better, have an embedded version of http://www.drpetter.se/project_sfxr.html (play with it, it's really cool)

Return to “General discussion”