[IAEP] View source in TA (was Re: Sugar Digest 2009-02-03)
Edward Cherlin
echerlin at gmail.com
Sat Mar 14 21:03:42 EDT 2009
On Tue, Feb 3, 2009 at 10:43 AM, Walter Bender <walter.bender at gmail.com> wrote:
> === Sugar Digest ===
>
> Baselines, Part 1: A few months ago, Tomeu Vizoso set a baseline for
> the Sugar "view source" functionality that had largely gone unrealized
> in most Activities. In the upcoming (March) release of Sugar, the
> default behavior of all Activities will be to have their source code
> opened inside of Pippy, the Python editor written by Chris Ball and
> maintained by C. Scott Ananian. (This is already the default behavior
> of Chat—try it, you'll like it.)
>
> While this is a baseline, it is clear that for many Activities, it is
> not sufficient. In some Activities, such as Browse, view source is
> geared towards the content being browsed, rather than the Browser
> itself. In a manner similar to the Mosaic web browser—and most
> browsers built since—view-source shows the HTML content from which the
> page is created. Browse puts a copy of the HTML content into the
> Journal from where it can be viewed and modified by the Write
> Activity.
>
> It has often been argues by me (and many others) that view source is
> what made the web transparent and enabled any consumer of web content
> to become a producer. Indeed, this was the threshold through which a
> generation has passed—remix is a part of our culture, not just
> something for Trekkies and other fringe groups as observed by Henry
> Jenkins in the mid 1980s.
>
> I have been thinking about view source within the content of Turtle
> Art lately. I had gotten immersed in Turtle Art when some teachers on
> the Sur list began asking for some extensions. At the time I tried to
> get them to make the extensions themselves, but the floor was too
> high. I jumped in in order to document the process of modifying an
> Activity and also to try to understand first hand where the
> difficulties laid. My early attempts are described in the wiki
> ([[Patching_Turtle_Art|Patching Turtle Art]]).
Thanks. The code seems to contain many Magic Numbers, as in 'sqrt':
(('num',True,0,20),('num',False,42,20)),
Are they documented anywhere?
> Between Bill Kerr's subsequent questions
> ([[Talk:Patching_Turtle_Art|Talk:Patching Turtle Art]]) and my own
> experiences, I was awakened to the fact that we have a long ways to go
> in terms of making view source meaningful to the teacher, the student,
> and the potential Sugar contributor.
I added some questions.
http://sugarlabs.org/go/Talk:Patching_Turtle_Art#Earth_Treasury
> View source was central to the discussion I had with Bill Kerr and
> Tony Forster last week in Melbourne. We agreed that it worthwhile
> exploring the impact of the addition of some more steps between using
> an Activity and viewing the project's Python code; indeed, it would be
> necessary if any but the most dedicated would venture forth.
That's what I am planning for a book on teaching with Turtle Art.
> Tony has
> braved the GNU/Linux shell to try to modify Turtle Art; he has been
> documenting his efforts ([http://tonyforster.blogspot.com/ Tony
> Forster blog]) Previously I had added an export function to Turtle Art
> so that the psuedo Logo generated in the graphical interface could be
> viewed inside a text-based, fully featured Logo environment—a one-way
> path towards more sophisticated programming concepts.
What would it take to provide the return path?
> As a result of the Melbourne discussion, I decided to take a slightly
> different approach. I have added two new blocks to Turtle Art
> (actually, at the moment, just to Turtle Art Portfolio, a fork of
> Turtle Art).
>
> One block lets you try Python code directly into it. It can be used
> for simple, in-line extensions, such as added new functions from the
> math library. It uses a simple set of assumptions: there is one input
> (int or float) and one output (float), e.g., typing sin(x) into the
> block turns the block into the sine function. It is similar to the
> programmable extensions found in may environments, such as
> [http://rupert.id.au/schoolgamemaker/morethan.htm Gamemaker]. While I
> expect that this will satisfy the needs of many of those who are
> looking for simple extensions to the Turtle Art environment, I don't
> think it addresses the question of how to provide a stepping stone
> towards modifying Turtle Art itself—in fact, it may discourage many
> from every bothering to view the source code because they can make
> changes without having to "look under the hood."
I'm going to see about explaining the transition and encouraging
people to take it up.
> I have higher hopes for the second block I introduced. Internally it
> calls a Python procedure, myblock, that is currently a "nop"—it simply
> returns without executing any code. The idea is that myblock, which is
> loaded as a separate module, will be modified by the end user. When
> Turtle Art Portfolio is launched for the first time, it makes a copy
> of myblock in the Journal. It can be opened in Pippy, where it can be
> modified and saved back to the Journal. From within Turtle Art, you
> can reload the myblock module by selecting a new module from the
> Journal.
>
> I've put some commented-out examples of what you can do with myblock
> into the Python code: a dotted line; some string manipulations; and
> the extension of the Turtle Art color space to include chroma (gray)
> in addition to hue and value.
>
> In using myblock, my typical work cycle is to switch between Turtle
> Art Portfolio, Pippy, and Log Viewer (so that I can see the error
> messages from the Python interpreter—I make a lot of mistakes as I
> code). The major limitation I face in the current implementation is
> that within Pippy I don't have access to the Turtle Art environment. I
> need all but rudimentary syntactic debugging in Turtle Art itself and
> I need to know what resources are available within that environment,
> which I can only find out by looking at more of the source code. (I am
> hoping that enough examples will help in regard to the latter issue.)
> Nonetheless, I hypothesize that the barrier to entry into making real
> modifications to Turtle Art is much lower now. I cannot wait to get
> feedback from the field to see if I am heading down the right path.
>
> I am hoping that other Activity developers go beyond the baseline set
> by Tomeu. I am sure that there are many creative ways to engage in the
> appropriation of the tools we are creating.
There are, indeed.
--
Silent Thunder (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) is my name
And Children are my nation.
The Cosmos is my dwelling place, The Truth my destination.
http://earthtreasury.net/ (Edward Mokurai Cherlin)
More information about the IAEP
mailing list