Teaching programming concepts to kids

Ross Werner rosswerner at gmail.com
Sun Nov 12 22:56:13 MST 2006

On Sun, 12 Nov 2006 21:05:31 -0800, Michael Torrie <torriem at chem.byu.edu>  
> On Sun, 2006-11-12 at 09:48 -0800, Ross Werner wrote:
>> lines of BASIC could look the same as one, it was pretty easy to get the
>> feeling that you were creating something that people would actually want
>> to play.
> While what you say is true, I think that there are some problems with
> the idea of throwing people into these more modern, advanced languages
> and paradigms.  I think the gap between knowing nothing about
> programming and being a professional programmer is much wider now than
> in the 80s when I learned to program.

This is very true. And I think it's a hard decision to make: do you teach  
someone the basics, worrying that they'll be bored because they can't make  
anything really useful? Or do you teach someone a very high-level language  
with a library like PyGame, worrying that they won't understand what's  
"really going on" under the hood?

I tend to vote for the latter, since it's inevitable (IMO) that  
programmers will understand less and less of what's "really going on"  
under the hood. First people complained that new programmers were jumping  
straight into programming in assembly and never really understood what was  
going on at the hardware level. Then people complained that new  
programmers just coded in C without understanding what was going on at the  
assembly level. Then people complained that new programmers were starting  
out with high-level languages like Java or Perl without ever understanding  
what was going on at the C level. Soon people will be complaining that  
people start out using massive libraries and frameworks on top of a  
high-level language and never understand what goes on even inside the  

So, in essence, that's my long way of saying: I think it's nice to teach  
people what's interesting first, and then let them piece in the basics as  
they're useful. But whether or not that's the best strategy, I don't know.

> As for things like PyGame, these are tools that will hopefully help and
> inspiring budding programmers.  As long as they can start simple and not
> get overwhelmed by class architecture issues, advanced primitives, etc.
> Simple line plotting and painting is probably a good beginning.  Can
> PyGame do this?

Yup, the following Python program will run on any machine with PyGame  
libraries installed, from Windows to OS X to Linux, without having to  
worry about graphics cards, what platform you're running on, etc.:

## Start Program
import pygame

screen = pygame.display.set_mode((640,480))
pygame.draw.circle(screen, (255,0,0), (120, 240), 50, 2)
while True:
## End Program

And that's just the simple stuff. There are also built-in sprite libraries  
(with collision detection), so with just a few lines of code you can have  
a simple graphic move around the screen interacting with other graphics.  
See this PyGame tutorial, for example, where it has a snake wandering  
around eating pellets:

Anyway, I've recommend this approach to at least a couple of people who  
were interested in learning basic programming, so we'll see how it goes!

	~ Ross

More information about the PLUG mailing list