[Edu-sig] Edu-sig Digest, Vol 39, Issue 2

Paul Gries pgries at cs.toronto.edu
Tue Oct 3 19:31:09 CEST 2006


On Oct 3, 2006, at 12:50 AM, Scott David Daniels wrote:
> kirby urner wrote:
>> Scott mentioned our not being able to see how many handles a mug has,
>> but with the sys module we can: ....
> Perhaps I said that, but what I _meant_ was that you could see the
> handles.  In my mind, at least, there is a huge difference between
> seeing the handles (what is this value's name?) and knowing how
> many there are.  I just don't know a nifty concrete-world analog
> to that.  The Library of Congress idea (too flawed, I agree) was
> neat because objects (books) could become "lost" without a librarian
> noticing.  Then on  to: "Well, if there were a count, and, ......"

I use a street metaphor.  (Which is where some of the lingo comes  
from anyway, isn't it?)  As a quick summary, houses are areas in  
memory and each has a unique address; people (variables) know the  
house they live in; a person's value is just the address of their  
house; x = y makes x live in the same house as y, and they can  
rummage in each other's personal belongings; deep copies are a lot of  
work; the contents of a house are accessible only to people who have  
the address; the number of people living in a house isn't immediately  
obvious; and when everybody moves out of the house, all the leftover  
stuff gets garbage collected.

Oh, and if you've talked about hardware at all you can make jokes  
about carrying things about on the bus.

Other similar things I've tried: warehouses with storage locations,  
apartment buildings, and offices.  Those didn't seem to work as well,  
but I tried them early on before I settled on streets; maybe they'd  
work out better today.

--
Paul Gries
Senior Lecturer, Dept. of Computer Science
University of Toronto





More information about the Edu-sig mailing list