Teaching Youngsters Programming

Drop in for a chat and a cup of tea

132 posts   Page 1 of 6   1, 2, 3, 4, 5, 6
by Sciman » Fri Jul 29, 2011 1:18 pm
I hope to start a programming club in my school next year. We will initially work on PCs but I would like to be able to tell the kids that they can get their own, ready to run computer for home and develop my club into a raspberrypi club. I am thinking that proper programming can be taught from age 10 and above if the models you sell come pre-installed with a few things.

I would wish to teach the children proper OOP from the beginning developing good programming habits from the start. This I believe can be done while maintaining interest if they have access to a suitable gaming library. Unless you know of any better ideas I would suggest your computers come ready to go with:

The latest version of Python 3
The latest PyGame libraries
The latest Eclipse IDE
all pre-configured so that students can start Eclipse and be ready to go.

(The installation of these things is far harder than learning to program and not something kids should have to get involved in)
Posts: 19
Joined: Fri Jul 29, 2011 1:04 pm
Location: London
by liz » Fri Jul 29, 2011 1:23 pm
I'd say that proper programming can be taught to kids as soon as they're able to read - no need to wait until they're ten! I love the idea of a RaspberryPi club. I was a member of a BBC Micro club when I was a kid, and it was sad to see the same club gradually morph into a club for teaching people to use Word as we got older.

We do plan on shipping with supporting materials, and of course, we're not expecting kids to be doing the installation themselves. Exactly what those materials will be is yet to be decided, but I'd say your suggestion isn't at all far off the mark.
--
Head of Comms, Raspberry Pi Foundation
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 4110
Joined: Thu Jul 28, 2011 7:22 pm
by Svartalf » Fri Jul 29, 2011 8:18 pm
Eclipse might be a bit heavyweight for the system (It uses Java...I'd use an X86 with those specs...but I'd rather not as it'd be...painful to use...)- not to mention that it's geared more for pro-grade dev work.

Having said this, there's several IDE environments that might be better on resources and accomplish something of what you're aiming for:

Gambas
Lazarus
(maybe) BoaConstructor
Anjuta for C/C++ development for the more advanced students...
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm
by snicklin » Sat Jul 30, 2011 6:45 am
Dev-C++ is also quite good as a lightweight development environment.
Posts: 5
Joined: Fri Jul 29, 2011 11:38 am
by ShiftPlusOne » Sat Jul 30, 2011 10:42 am
Dev-C++ is a windows IDE and it has been somewhat neglected lately. CodeBlocks is a good cross-platform alternative.

Lazarus is great idea too.
Forum Moderator
Forum Moderator
Posts: 1926
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by Sciman » Sat Jul 30, 2011 1:29 pm
It is a shame that Eclipse is unlikely to run on RaspberryPi as it had a number of advantages and runs really well on my MacBook Pro !

The main advantage was that it can easily be arranged into three panels: one with file management, another where you code with error alerts, and auto tabbing, etc., and an output panel. These all look more or less the same in Windows, Mac OS or Linux and as such if we teach at school on a PC it matters not what the students have at home - they should be able to easily continue with any worksheets etc supplied. It is also free. The disadvantage is the painful installation to get it up and running with the latest version of Python. None of the other IDE suggestions quite seem to fit the bill perfectly.

My background is mostly in Java but I have started to look at Python to see if it would be a better language for teaching. I am very impressed with it, but there do not seem to be any child friendly IDEs like BlueJ for example. Liz suggested that children could start programming as soon as they can read. My observations are that children start to read and stumble for a while. They then start to write and quickly hit a wall when they find their spelling is poor and they have to be encouraged to go for it even if there are some spelling mistakes. They then learn to spell better as their writing improves through extensive reading and spelling tests. They finally learn to type. Parents and teachers can read the children's writing with spelling errors because they are human. Writing code is an unforgiving business hence to avoid discouragement an IDE that points out syntax errors as they go along rather than at run time is, in my opinion, essential. My, admittedly limited, experience is that quite bright 10 year olds (Year 5 in the UK) have reached this stage; extra bright 9 year olds possibly and 8 year olds if they cheat by having a parent type for them as they read along. Obviously you can knock off a few years for girls (who can actually concentrate for more than five minutes).
Posts: 19
Joined: Fri Jul 29, 2011 1:04 pm
Location: London
by ShiftPlusOne » Sat Jul 30, 2011 2:57 pm
I don't know sciman, I was comfortable with Visual Basic when I was 7. Admittedly, my dad wad a programmer so he helped me grasp the essentials concepts and would answer whatever questions I had. I did find it hard to understand the difference between the different variables and the terminology used was a bit of an overload, but spelling and reading made no difference. I was reading Tom Sawyer at that age, so I don't see how programming statements could possibly be a problem for a child.

I'll use a bad example to make another point. When people are raised in a religious household they tend to take that religion for granted sometimes. For example, you might go to church, but only because that's what you're expected to do. If however you discover a religion (or lack thereof) you will take it much more seriously and will want to learn more. In the same way, if a child is taught programming at an early age, they might not appreciate the point of it.

I had to beg to use the computer when I was a kid (though I did mostly play prince of persia), so any time I got, I'd appreciate a lot more. I didn't play around with VB because I was told to, I did it because I was curious. I don't think I was ever drawn to the things which I was told to do. I never cared much for books or drawing and I think that's partially because those were expected of me.

If you read iWoz, Wozniak talks about how his passion for electronics started and it wasn't forced on him at all, he just asked questions and his father answered.

So yeah, I think my point is that you shouldn't make it a chore and let children discover things for themselves. Perhaps they are more inclined to paint or to play sport than to program, and there's nothing wrong with that. Make as many activities available and encourage them to find their own calling.
Forum Moderator
Forum Moderator
Posts: 1926
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by Sciman » Sat Jul 30, 2011 4:32 pm
I agree ShiftPlusOne that motivation and ownership (ie not having something forced on you) are the best motivators and make children most likely to succeed. This is why we want to teach programming initially in a club at school. I also believe that this kind of motivation helps children battle through the obstacles they meet. It is however a good idea to remove as many obstacles as possible for learners.

I think you would have liked Python when you were 7 for the same reason I am drawn to it as a teaching language because, amongst other things, you do not have to worry too much about variable types.

In essence I am agreeing with you entirely. I just wish there was a cool, simple, fast, low-overhead, cross-platform IDE available for Python 3. This would help take away a few very important obstacles from curious learners. Is that not too much to ask? :o)
Posts: 19
Joined: Fri Jul 29, 2011 1:04 pm
Location: London
by ShiftPlusOne » Sat Jul 30, 2011 4:53 pm
Ah, 'ownership' is a good word for it. And yeah, I got a bit sidetracked from the actual point of the thread.

I think when these things get into the hands of the hobbyists, developers and hackers, we'll have pretty much all the reasonable IDEs ported over and it will just be a matter of choosing what works best. Eclipse might be a bit heavy, but there are plenty of free, cross-platform, lightweight IDEs which support Python.
http://wiki.python.org/moin/In.....vironments
Forum Moderator
Forum Moderator
Posts: 1926
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by EWH » Sat Jul 30, 2011 8:00 pm
OOP shouldn't be a primary requirement. It's more of a religious precept with confusing theology than anything else. The same is true of structured programming and functional programming. Good ideas, but sometimes a GOTO or procedural bit with side effects will get the job done faster. The language should accommodate all these methods, but it shouldn't be a requirement to get things to work. Languages that allow interactive programming and easy graphics and other I/O are best for kids. Processing / Proce55ing would be a very good choice, IMO.
Posts: 11
Joined: Fri Jul 29, 2011 9:10 pm
by gsfgames » Sun Jul 31, 2011 9:09 am
I remember reading somewhere that OOP shouldn't be the first choice for programming for young children as they cannot grasp the abstract concepts of inheritance amongst other OPP concepts. Start with simple concepts and work up.
Posts: 1
Joined: Sun Jul 31, 2011 9:00 am
by Lerc » Sun Jul 31, 2011 12:11 pm
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.

I have been doing a small amount of teaching for kids around the age of 10. I went with JavaScript to give them something they could get at easily via their browsers. I start extremely simply though, but with something that can show immediate results. A helper script sets up things so that they can do things without having to deal with boilerplate code.

So a program like this is easy to comprehend.
http://fingswotidun.com/javasc.....program.js
http://fingswotidun.com/javasc...../page.html

Then it's not to far to here. While the program is still simple enough to take in as a whole, the kids can already see the possibilities.
http://fingswotidun.com/javasc...../page.html
http://fingswotidun.com/javasc.....program.js

The programs work in lightweight browsers like Midori so they would be technically viable for the Raspberry, I would be concerned that canvas rendering may be slow. A standalone JavaScript engine connected to a GL renderer would give much more bang for the buck. It wouldn't be inconceivable to do something like that with a common api so that things could run either standalone or in-browser.

mostly just food for thought.
Posts: 14
Joined: Sun Jul 31, 2011 6:04 am
by Michael » Sun Jul 31, 2011 2:53 pm
Just came across this excellent article:
http://www.readwriteweb.com/ar.....o_code.php
Posts: 340
Joined: Sat Jul 30, 2011 6:05 pm
by river226 » Sun Jul 31, 2011 4:11 pm
This was developed for OLPC, so it probably fits the power requirements and has a kid centric python programming environment that might work:
http://wiki.laptop.org/go/Sugar
Posts: 1
Joined: Sun Jul 31, 2011 4:07 pm
by Lerc » Sun Jul 31, 2011 6:39 pm
Sugar isn't a good fit.

I have an XO-1, it has 256 meg and struggles with Sugar. The XO-1.5 has a gig I believe.
I have fielded a fair few questions from XO users in the field and one of the most common first questions was "How do I remove Sugar?"

Sugar does have some very innovative strong points, but they are largely based upon collaborative working, as such Sugar also presumes you have a network connection.

I'd be a little hesitant to say to avoid Python entirely for a low memory device, but based upon my experience with sugar, only a little.
Posts: 14
Joined: Sun Jul 31, 2011 6:04 am
by liz » Sun Jul 31, 2011 9:02 pm
Quote from EWH on July 30, 2011, 21:00
OOP shouldn't be a primary requirement. It's more of a religious precept with confusing theology than anything else. The same is true of structured programming and functional programming. Good ideas, but sometimes a GOTO or procedural bit with side effects will get the job done faster. The language should accommodate all these methods, but it shouldn't be a requirement to get things to work. Languages that allow interactive programming and easy graphics and other I/O are best for kids. Processing / Proce55ing would be a very good choice, IMO.


Yeah - I feel (this isn't me with my RasPi hat on) that OOP's not a good way to get kids started, but I'm very enthusiastic about the idea of straightforward imperative protocols for teenies. There's a lot you can do with Python without getting into object oriented stuff. Of course, it's very helpful if you've got a parent or teacher in the background too, but we've been very aware that that's not an option for everyone. We're hoping that we'll have some very directed learning materials on the board that ships to the educational market which obviates the need for a trained grown-up in the room.
--
Head of Comms, Raspberry Pi Foundation
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 4110
Joined: Thu Jul 28, 2011 7:22 pm
by abishur » Mon Aug 01, 2011 2:06 am
That's pretty cool, is the learning material something you're designing or a deal you're trying to work out with another company? (or is that not really something ready for discussion yet?)
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4298
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by Sciman » Mon Aug 01, 2011 9:43 am
At the risk of sounding like a religious zealot for OOP, I have to cautiously disagree with the general feeling that OOP is not suitable for children. I think the most difficult things for beginning programmers is working out where to start and then getting lost later in the development of their ideas. OOP basically gives them a way of carefully building objects in bite-size pieces and then linking and re-using their work. It also uses a very accessible metaphor where chunks of code, model objects the young programmers are trying to build. I know you can do this with functions and so on but OOP forces a structure on programmers that can be liberating if well taught. At the same time young programmers can move easily to non-OOP languages later as they are learning the minutiae of programming while developing methods for their objects. It does not seem to be as easy to move the other way.
Posts: 19
Joined: Fri Jul 29, 2011 1:04 pm
Location: London
by Sciman » Mon Aug 01, 2011 9:54 am
I love Microsoft's IDE used with Small Basic in the link supplied by Michael above. The URL again:
http://www.readwriteweb.com/ar.....o_code.php
Posts: 19
Joined: Fri Jul 29, 2011 1:04 pm
Location: London
by eggn1n3 » Mon Aug 01, 2011 3:02 pm
I am programming for more than 25 years and worked with assembler, Pascal, C, C++, Python, Perl etc. Although I find Python very easy for an OOP languague I found it relatively difficult to learn C++ for example as the concept of objects can be a bit overwhelming. Start simple I would say....
Posts: 106
Joined: Fri Jul 29, 2011 10:36 am
by alecthegeek » Mon Aug 08, 2011 7:07 am
Can I make some suggestions?

It is important that to realise that many RasPi owners will be using their computer with someone else’s syllabus. The tools and platform need to be open and flexible for any programming technology and style of teaching. However solo learners should have something to bootstrap themselves

1) Python 2.7 -- IMHO Python 3 is still too bleeding edge and will be for some time
2) A powerful editor such as Jedit (Jedit has the advantage that students can use the same tool on Windows and OS/X. NB Needs Java). Using an editor rather than a professional level IDE makes the initial learning process more focused -- you learn the basics of programming rather than how to use the IDE. In addition an IDE (intentionally) hides a lot of important concepts.
3) Bazaar version control system for "advanced" students (maybe)
4) A substantial number of Python Libs for graphics, games, mathematics etc.
5) An HTML page with links to Python tutorial information (VIdeos, e-Books etc)
6) More Links to additional technical topics e.g. XML, programming puzzles, etc....
Posts: 37
Joined: Mon Aug 08, 2011 3:11 am
Location: Melbourne, Australia
by DavidWaller » Mon Aug 08, 2011 4:31 pm
I suspect in many schools the rasPi will be used in computer clubs as the official school syllabus will take time to catch up with innovative designs. That said I believe everything should be done to help computer clubs and the forward thinking schools to use devices such as the RasPi and agree with many of the comments above.
An area that I consider very important, especially for the solo learner and the computer clubs is information on the device and lots of example (short) programs that learners can easily type in and get a quick response. 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. The various Wikis do a good job but are harder to read off line and are not always classroom friendly.
Posts: 1
Joined: Mon Aug 08, 2011 4:09 pm
by alecthegeek » Mon Aug 08, 2011 9:54 pm
What features would make material classroom friendly?

Perhaps a wiki with videos, screencasts, presentation deques and other media. It should be possible to maintain a wiki in such a way that it makes sense when printed (to a PDF) and with media that can be downloaded for offline use.

The way that a community can continually improve the material in a Wiki is the killer feature for an educational resource IMHO.
Posts: 37
Joined: Mon Aug 08, 2011 3:11 am
Location: Melbourne, Australia
by codemagician » Sat Aug 13, 2011 11:56 am
I would like to add my opinion to the discussion.

I have had some experience teaching programming languages and Python is my favorite choice.

I like it because it's an interpreted language (no compilation like C, C++ or Java) and this means kids can get right into doing "stuff" and learning and most importantly having fun.

I grew up with the Acorn Electron and BBC Micro and one of the reasons why I loved them so much was that you could just "do stuff" quickly and see the fruits instantly. The feedback was so quick, you could change your approach see what happened and grope your way to success. The act of typing and trying things helped you remember statements and experiment.

Python doesn't use braces for code blocks and has a good consistency throughout. The code is easy to read, even other people's code- uses indentation as part of the syntax.

It has built in data types such as Tuples, Lists, Strings, Integers, Boolean and Dictionary (hashes) which means kids can get right into the fun aspects of programming instead of the gritty parts. Take for example C, where only primitive data types are available.

Python also has Class and custom Objects which means OOP can be taught, but doesn't have to be the entire focus of the learning experience. Perhaps a Python student can wet their appetite first with some linear programming and those who become hooked will go on to learn more.

It has a console mode which means kids can enter statements into the interpretor to try things- this in itself is a great way to learn, experiment and try things without any need to even open or save a file. A child will feel more confident to try what he might perceive as a "silly idea" inside the console rather than risk scrutiny by making a more concrete file. In short, the environment for Python is conducive to the right learning experience.

Python will put the fun back into learning fun and create a positive feedback loop keeping their interest and momentum moving forward.

Another important point is that Python is sufficient low-level enough that the kids are not so detached from the OS. In my opinion, using IDE's to learn with just puts a straight-jacket on their learning. I think it's an unnecessary layer detaching them further from the fun part. A simple colour syntax highlighting editor would suffice.
Posts: 3
Joined: Sat Aug 13, 2011 10:25 am
by Lucretia » Tue Aug 30, 2011 10:43 am
Quote from EWH on July 30, 2011, 21:00
OOP shouldn't be a primary requirement. It's more of a religious precept with confusing theology than anything else.


That's because of the "everything is an object" ideology, which is totally wrong. You should only define an object where it makes sense to, i.e. if it can be generalised in some way.

You want a strongly typed language so that you can concentrate on the types. With a strongly typed language you could provide operations on a type with and without overloading. It works in a similar way to OO, but if it's not an object type, then you cannot extend it. It makes more sense.

Luke.
Posts: 37
Joined: Sun Aug 28, 2011 10:49 pm