[Chicago] python intro for 13 yo -- suggestions?
Ian Bicking
ianb at colorstudy.com
Wed Jul 12 20:47:26 CEST 2006
Peter Harkins wrote:
>>Anyway, I think mixing Javascript with the browser and the DOM, a
>>good/clean Javascript library, and some persistence on the server side
>>(implemented in Python or whatever) could be very interesting indeed.
>
>
> One of the things I'd like about the browser for an introductory
> environment is its limited set of primitives, but I see enough problems
> in the complexities of the DOM, reloading, content/style bifurcation and
> such that I don't agree that it'd be a good environment for beginners.
> But I'd be very happy to be proved wrong.
I think of the browser as a medium, more than the complete platform.
Just like a screen with pixels is a medium -- there's certain primitive
operations, and given (say) pygame you can get access to those
operations on a pretty low level, but that's not what you'd introduce
someone to. (And even experienced programmers might not spend that much
time on that level, though for web programming that seems less true.)
So you have some basic elements, and you have operations on them. The
elements in a browser are DOM nodes, which are pretty accessible. The
actual DOM *methods* aren't that great, but the nodes are workable --
you can see them, fiddle with them, they are pretty powerful and
flexible. Someone should then build an environment around that.
For instance, imagine you could click a toggle at the top of the screen
"edit methods". Once that is toggled on, you click on any DOM element,
and a series of methods is shown (methods like onclick). You can add
Javascript to attach to that method, and that Javascript will have
access to some nice methods. I think it's even easy to add methods to
DOM elements, so it could do "this.hide()". Then you untoggle the
method editor, the Javascript source disappears (hidden, really; maybe
attached to an attribute), and you can interact with the page. And
there's some Wiki-ish save (but without Wiki markup, of course, since
we're using DOM nodes and not ASCII), where the Javascript and the nodes
are all saved together.
Ian
More information about the Chicago
mailing list