<div><span class="gmail_quote">On 2/6/07, <b class="gmail_sendername">Peter Drake</b> &lt;<a href="mailto:drake@lclark.edu">drake@lclark.edu</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">It&#39;s not that I&#39;m going to do procedural first and objects later. The<br>vast majority of these students will never take another programming
<br>class. There is also a significant level of math phobia in this<br>course, so anything I can do to make it less complicated is a win.<br>Indeed, they spent the first couple of weeks with LEGO robots...</blockquote>
<div>&nbsp;</div>
<div>The OO paradigm is at first just a lingo, jargon, way of talking,</div>
<div>at first, very oriented around the &quot;dictionary&quot; in Python, as in </div>
<div>self.__dict__ and/or module.__dict__.</div>
<div>&nbsp;</div>
<div>I start with fuzzy animals (and/or not fuzzy, e.g. snakes) when working </div>
<div>with younger students, reminding them how natural it is, already, to think </div>
<div>in terms of blueprints or templates, then instantiated in the form of these </div>
<div>or those &quot;instances of&quot; -- all very embedded in our native grammar, if ya </div>
<div>know what I mean.&nbsp; Part of what made OO (ala Smalltalk) such a </div>
<div>breakthrough in the first place.<br>&nbsp;</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I was under the impression that Python was trying to be<br>&quot;multiparadigm&quot;, so you could program in a procedural, OO, or
<br>functional style. This doesn&#39;t seem to bear out for any but the<br>simplest programs, but I&#39;m hoping I can pretend it&#39;s procedural for CS0.</blockquote>
<div>&nbsp;</div>
<div>It&#39;s true that you&#39;ll hear that, but just as often&nbsp;hearing&nbsp;&quot;everything is an </div>
<div>object in Python&quot; which is even more true&nbsp;of Python than&nbsp;of Java&nbsp;say, </div>
<div>cuz even the so-called &quot;primitives&quot; are also dissectable using dir().&nbsp; </div>
<div>&nbsp;</div>
<div>One of my favorite &quot;first day&quot; trix is to go dir(1) and then talk about </div>
<div>the resulting dump.</div>
<div>&nbsp;</div>
<div>Basically, a key to Python, plus many other OO languages (Java, </div>
<div>Javascript, VB, VFP...) is &quot;dot notation&quot; (other languages might use</div>
<div>:: or -&gt;).&nbsp; </div>
<div>&nbsp;</div>
<div>In explaining how somelist.reverse() &quot;reaches into a list object for its </div>
<div>reverse method&quot; I can&#39;t help but speak in terms of noun.verb() or thing.action().&nbsp; </div>
<div>&nbsp;</div>
<div>dog.bark() or monkey.smile() just come naturally at that point, to where </div>
<div>you&#39;d want a Dog and/or Monkey class projected on the Big Screen, </div>
<div>for students&#39; collective edification.</div>
<div>&nbsp;</div>
<div>Kirby</div>
<div>&nbsp;</div></div>