[Edu-sig] interactive python tutorial online (as tryruby)
kirby.urner at gmail.com
Fri Dec 26 20:39:58 CET 2008
On Fri, Dec 26, 2008 at 10:43 AM, Jurgis Pralgauskis
<jurgis.pralgauskis at gmail.com> wrote:
>>> maybe smb knows of similar initiatives ?
> googling around found
Excellent set of visualizations, although I bailed just now on
recursive Fibonaccis, a reflex as that's so not the right way to do it
(but hey, the author is teaching recursion, so my problem not his).
"I'll be back" (Gov. of California voice).
I especially liked the one about lists and pointers, as it hearkens
back to recent long threads right here on edu-sig about how to best
visualize what's happening in:
s = 
t = [s, s, s]
for ele in t:
ele += 1
[, , ]
(one of the examples, updated to Py3).
That you get to watch more than one visualization and then "vote" is
so focus group. The more Pythonic visualizations seem to come later
(numbers too are objects, a = 1, then a = 2 is repointing name 'a', b
= a means another name for the same object...
Probably the whole notion of reference counting and garbage collection
is a good place to dive into the system language implementation when
the time comes?
Copying is "discouraged" in Python because of the "heavyweight
objects" and "lightweight names" model: i.e. could easily be very
expensive to copy (and why did you need two of the same thing in the
first place?), memory-wise, so "a = b" doesn't mean that, and adding
lots of names is very low overhead.
In my Saturday Academy class, a typical object is "a bulldozer" or "a
train" in a somewhat literal sense, in that I'm having them imagining
puppeting their sandbox toys via some AJAXy eyecandy or whatever (a
mental exercise), except now they're not just sandbox toys anymore,
but the real deal.
Oh, and the regular expressions thing (first one) -- fantastic.
Michael Weigend is a talented artist.
I thank you for sharing this link, will be shopping it around to my teachers.
More information about the Edu-sig