[Edu-sig] python from the very beginning: "we" versus "it"

kirby urner kirby.urner at gmail.com
Fri Apr 8 02:33:28 EDT 2016


I think what older folks like me need to remember is that people coming
from cell phones and tablets may have a very sketchy concept of a "file
system".  I go back to DOS and Windows, where the File Manager was a
centerpiece.

If you've drilled down through folders on a laptop, then maybe you've see
it in your mind's eye, but I can't take it for granted that students
learning Python have much sense of the file tree.  They come to code school
with a just-purchased laptop in some cases, wondering what to do next.

Using Python as a calculator i.e. interactively, is different from seeing
python as something that "eats modules" at the command line.  There's like
a "we" (me and the snake) when whispering in a REPL, whereas it's more an
"it" (on its own, or her own) when made to eat a module in the wild.

>From playing computer games, students are probably familiar with "first
person view" (FPV) versus third person or "god's eye", like in many
simulations such as SimCity and Civilization.

Python in the REPL is more FPV (me and Python -- or 2nd person) whereas in
3rd person "run mode" there's no "me" to create objects or share the
namespace with, as when we're together, say in Spyder (an IDE).

When I run the script in an IDE, I can make use of names defined in the
I-Python REPL. Conversely, the one line script print(a + b) will run
without issues, if I've defined the names, e.g. a = 10; b = 11, in the
REPL.  In 3rd person mode, we'd get a NameError.

[ So how is all this different from the Clojure Reader we read about, I
wonder.  Is that different from a REPL in a namespace shared with running
code files? ]

In the REPL we're more "snake whisperers" whereas when you feed Python a
module, that's more being a "wrangler" perhaps.  You might run many pythons
at once ("herding Pythons").

I know, I know, it's not named for the snake originally, but it's hard to
fight that, so I go to the other extreme and get maximum mileage out of it
e.g. using "__ribs__" as a moniker for special names -- snakes have lots of
ribs plus we're talking about "reflex arcs" -- triggered methods, like
__getitem__ -- akin to what a spinal chord does.  A class with __ribs__ is
built to react.

Someone new to the whole picture is looking for handles, conceptual cues.

How to best plant this tree of knowledge, right from the beginning?

Maybe leverage existing knowledge of grammar, computer games, and reptile
anatomy?

Worth a try, depends on the audience.

Kirby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20160407/0de544a6/attachment.html>


More information about the Edu-sig mailing list