[Edu-sig] The Crunchy Way
kirby.urner at gmail.com
Fri Mar 27 17:30:40 CET 2009
I'm in 'Learning and Teaching Python Programming: The Crunchy Way' by
Dr. Andre Roberge.
This would be the "Python for Educators" track, only informally
defined (as a namespace?) at Pycon. There's a BOF later.
He's claiming to be an imposter (we don't believe him) because he
isn't teaching Python these days (except he is, right now).
He used to teach physics, knows about pedagogy.
A goal is to screen scrape, find code in <pre> tags, and supplies an
interactive shell box. "VLAM" -- very little added markup.
Crunchy "eats" HTML pages (good name then -- no Frog anymore).
This is an effective way to present a Python talk then: write your
slides in HTML and run 'em through Crunchy.
"A regular Python interpreter inside the web browser".
Interpreter errors are intercepted and may be reprinted in different
languages (human languages).
By toggling the editor you get an embedded WYSIWYG editor. You can
actually load and save files from your local tree in this system. Go
ahead an launch any program in a separate process / window (Pyglet
demo -- bouncing balls).
Ian: "Are you listening to this?"
Me: (nodding) "yeah, writting about it".
He's showing a dynamically generated graph coming into the web page --
The doctest module helps with test-driven learning. Very TDD (test
Show double(arg) --> arg*2 working first, challenge page reader to
write the code in an editor box. The doctests get applied (duck
typing -- you could pass the tests with a faux function I bet...).
PyWhip is moving in the same direction.
Using unittest is another option (instead of doctest).
Ian: "this is very powerful!"
You can pick an analyzer, e.g. pyflakes, pychecker and analyze the
code. There's a "code quality" measure, which varies depending on
which analyzer is chosen.
The "editarea" widget is really cool. You can vary the size, go to
full page -- very capable.
Now he's showing stepping through with PDB, showing the local
namespace (in yellow the first time -- then white if it's "old", the
red if it changes). There's also an output window.
Croquant (French for Crunchy) is a complement to Crunchy, an extension
of MoinMoin that adds the VLAM so when loading from a Croquant wiki,
you have Crunchy-ready content.
So Croquant is like a delivery tool, where the lesson plans
accumulate. PyWhip is similar but more static (making the content
Wiki based is likely to promote organic growth).
Crunchy allows plugins (a talk in itself). There's an experimental
turtle module (I knew there was a turtle in here somewhere -- glad to
see I'm not completely off the wall in remembering that).
He'd like to collaborate on some of the issues (security, user accounts...).
Crunchy is not meant as a main IDE so much as a learning tool,
reading/writing Python in classroom situations.
Q&A: one of the A/V guys has a question (some of our A/V volunteers
are also Python developers -- others not).
Crunchy is designed to be used on your own machine (you the learner,
student, run Crunchy locally).
Great talk! I'll definitely put a chip in the "green bucket".
More information about the Edu-sig