<div dir="ltr">I agree with Gary that mutability is a property of objects, not of variables. An object has methods. A name does not - it can refer to an object with a particular method. I do not get the variable and remote buttons analogy at all. The importance of a variable naming a memory <i>location</i> with a reference is that clearly there can be only one reference at that memory location at a time. There is nothing saying with the English word "label" that two different objects/places could not have the same naming label slapped on them, so relying too heavily on easy English analogies is tricky.<div><br></div><div>In my <a href="http://anh.cs.luc.edu/python/hands-on/3.1">Hands-on Python Tutorial</a> I say all data has a type, and I start with immutable objects types. I say initially that a variable is a name used to refer to a piece of data. Much later I get to mutable objects, and then the idea of a reference to an object is key to understanding. I point out that with immutable objects this does not make much difference, but when we start dealing with mutable objects, it is important to be more precise. This sequence seems to work fine.</div><div><br></div><div>Andy</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Dr. Andrew N. Harrington<br> Computer Science Department <div> Graduate Program Director <a href="mailto:gpd@cs.luc.edu" target="_blank">gpd@cs.luc.edu</a><br><div> Loyola University Chicago<br> 529 Lewis Towers, 111 E. Pearson St. (Downtown)</div><div> 417 Cudahy Science Hall (Rogers Park campus)<br><a href="http://www.cs.luc.edu/~anh" target="_blank">http://www.cs.luc.edu/~anh</a><br>Phone: 312-915-7982<br>Fax: 312-915-7998<br><a href="mailto:aharrin@luc.edu" target="_blank">aharrin@luc.edu</a> (as professor, not gpd role)</div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Feb 15, 2016 at 8:58 PM, kirby urner <span dir="ltr"><<a href="mailto:kirby.urner@gmail.com" target="_blank">kirby.urner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Feb 15, 2016 at 5:23 PM, Carl Karsten <span dir="ltr">
<<a href="mailto:carl@nextdayvideo.com" target="_blank">carl@nextdayvideo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>I think the point of this thread is: how important is this subject?<br>
<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I don't know that there's a scale of 1-10 answer. If / when it comes up, as a student question, it becomes important, but also instructors need to explain how a given object may have many names, whereas of we're focused on "containers" how does that look?<br>
<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div></div>
I have one of many answers: in my 2 hour 500 line intro to python, it gets about 60 seconds spent on this 1 line:<br>
<div>
<div><br>
"""Other languages have variables; technically, Python doesn't. But it has something that looks like a var: It has names. So don't call it a var. For a good explanation of this see
<a href="http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#other-languages-have-variables" target="_blank">
http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#other-languages-have-variables</a> """<br>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This is excellent. <br>
<br>
I was racking my brains where to find visuals like this, specifically showing the buckets versus post-its models.
<br>
<br>
I've added links to my make_links_v2.py and make_links_v3.py @ <guild /> [1]<br>
<br>
</div>
<div>This thread was useful for our trains at PDX Code Guild at least, as I'm having philosophical differences with some of my peers regarding the uber-basics and how best to teach them.
<br>
<br>
I've been told repeatedly that code school students will start out *not* knowing what a variable is and my number one most important responsibility, right from the get go, is to introduce the concept.<br>
<br>
</div>
<div>Fine. But what if the curriculum hard-codes that we should see variables as "containers".
<br>
<br>
Before I lead a boot camp, Python-centric, I want to make sure I'm not shackled to a misinforming presentation I'm not comfortable teaching. It'd just feel wrong, like I'm lying, to force the "container metaphor". I needed ammo.<br>
<br>
</div>
<div>By now, thanks to these threads today, I feel well armed in my views that I'm free to avoid said metaphor if I want to.
<br>
<br>
Here's a screen shot of our faculty Slack feed from a few minutes ago:<br>
<br>
<a href="https://flic.kr/p/DduBoA" target="_blank">https://flic.kr/p/DduBoA</a><br>
<br>
There's enough consensus out there to defend my position. Yay.<br>
<br>
What I want to avoid is another instructor insisting on the "variable as container" metaphor to a point where I feel I have to do extra work to undo that picture.
<br>
<br>
Thanks again for the tools, should that come up.<br>
<br>
</div>
<div>Kirby<br>
<br>
[1] <a href="https://www.dropbox.com/home/PDX%20Code%20Guild/Accelerated%20Programming%20%28fork%29" target="_blank">
https://www.dropbox.com/home/PDX%20Code%20Guild/Accelerated%20Programming%20%28fork%29</a><br>
<br>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br></div></div>