ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> edu-sig
edu-sig
Re: [Edu-sig] Queens, NY - PYTHON Programming for Kids
by Kirby Urner other posts by this author
Jul 13 2000 1:57AM messages near this date
Re: [Edu-sig] Queens, NY - PYTHON Programming for Kids | Re: [Edu-sig] Queens, NY - PYTHON Programming for Kids
> I came up with some simple rules for assignment (variables as boxes with
> stuff in them), including a way of drawing them on the board, then had the
> kids 'execute' short snippets to see how they worked.  It's fun, it's
> active, and it doesn't cause monitor burn :)
> 
> Dustin

This all sounds like wholesome fun (there's that word again).

On the "variables as boxes with stuff in them" model, I think
we've touched on this earlier, but it might be useful to thread 
a bit on what're the most useful metaphors that'll not lead 
to confusion down the road.  I'm thinking of stuff like:

> >> a = b = [1,2,3,4]
> >> a
[1, 2, 3, 4]
> >> b
[1, 2, 3, 4]
> >> a[0]='A'
> >> a
['A', 2, 3, 4]
> >> b
['A', 2, 3, 4]

'a' and 'b' both point to the same object, and changing
the "contents" of 'a' also changes the contents of 'b'.
The "stuff in boxes" metaphor tends to "break" at this
point.

Another metaphor is "dog on a leash" and the idea that
more than one person has a leash to the same dog.  
Dog = Object in this picture.  So if you feed Joe's 
dog, you're maybe feeding Sally's dog as well, as 
they both have pointers to the same dog.

But other times, the "stuff in boxes" metaphor is apt
-- I'm not implying it has to be either/or, just that
we need a rich set of analogies handy, to keep Python
(and by extension, computer workings in general), as
transparent and intuitive as possible.  Dustin's point
that some mental model of computer memory is worth
instilling is right on I think.

I'm sure others have done some thinking along these 
lines and might elaborate on what they think is good
metaphorics.

Kirby

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved