[Edu-sig] Question about a programming system

Benjamin Fallenstein b.fallenstein@gmx.de
Thu, 04 Jan 2001 04:26:31 +0100


Hi everybody!

I've been lurking on this list for a while and it seems you're quite
Python-centered; but I read somewhere this is the place for discussion
of the CP4E project, so I thought I'd post this here. I am developing a
system for programming which I hope can greatly simplify that task (yes,
I *know* many others said that before ;) ), and I'd appreciate some
comments on the underlying idea.

Yes, I do like Python, it's actually my prefered programming language,
but I think something else would be better for non-technical programming
novices. Despite it being much more readable than many other programming
languages, it does not take this air of being something very complex
away from programming. One of my favourite examples for my programming
system is the following statement:

"Move the selected card to the stack the user clicked on."

In Python, the same statement may read:

"move(selCard, clickStack)"

I do think the first version is more readable. Yet, in my system it's
functionally equivalent to the Py command. How? Well, it's not keyed in,
but rather assembled on the screen, from three different parts: "the
selected card," "the stack the user clicked on," and "move [which card?]
to [which stack?]." The first two parts are references to variables, the
third, surrounding one, a procedure call with two parameters. Thus, you
have the freedoms of combination programming gives, i.e. you could
change the statement to, for example, "Move the selected card to the
stack the Queen of Diamonds is on," provided you have the corresponding
symbols "the stack [which card?] is on", and "the Queen of Diamonds."
There's mouse-over highlighting of the different levels of symbols so
you won't get confused.

Computer programs usually have the bad property to look like a big piece
of math *to the people who are afraid of math*. Now there are a lot of
people like that out there, far too many. Well, you know that. A program
written with my system, on the contrary, would be understandable to
everyone who's able to read the natural language in which the different
symbols are expressed. At times, it may sound exhaustingly formal, but
even then it will be far more readable to a non-programmer than a
program written in a usual programming language. Moreover, the meaning
of concepts like "parameter" will be much more "intuitively" clear,
because they will rely on the referential mechanisms employed by natural
language. (Where these mechanisms become unclear, the computer will
provide clarification ("that card" -- WHICH card?) when a symbol is
mouse-overed, encouraging interactive exploration.)

I call this system the "zaubertrank" (TSAU-ber-trunk), which means
"magic potion" in German, because I want it to make people into
programmers as fast as the magic potion in the Asterix comics makes him
an invincible warrior. ;) ;)

I do think this system holds some promise for the goal of "computer
programming for everyone." In fact, I started seriously working on it
because sometime soon, I'll be teaching a course in which non-techies
(humanities and social science students) will be required to learn to
program, and I hope that with this system the learning curve will be
much better than even with Python. From conditionals to function
declarations, many things become trivial to understand. ("def
points(card): if card.rank > 7: return 10; else: return 5" is replaced
by "The value of a card in points is 10 if the rank of the card is 8 or
higher; otherwise, it is 5." Yes, that's exactly the same program!
(Except it's described more like with the ?: operator of C.))

Does this scale up to very complex programs? Which programming paradigms
work best with it (i.e., what translates best to natural language)?
Frankly, I don't know. I'm trying it out. Feel free to bash me if you
think it won't lead anywhere. :) At the moment, it seems to me that a
lot of functional programming would be a good ingredient, because that
maps quite well to the concept of "definitions" we're so familiar with;
the points function above is an example. The imperative concept of
storing intermediate values in variables doesn't seem to work as well.
("System" variables -- system like in simulated system -- do work, on
the other hand, like the cards and the stacks they're on in the
card-game example.)

Last summer, I started prototyping in Python, but then I decided to base
this on the GZigZag platform, a system designed by Ted Nelson, inventor
of the hypertext. ( http://www.gzigzag.org/ ) The reason for this
decision was that GZigZag has many inherent visualization and data
modeling capabilities which I thought would work together with the
zaubertrank quite well. Now, GZigZag is still not ready for prime time;
there are a lot of unfinished ends. So, needing the platform quickly
made me a member of the development team... anyway, the system supports
enough of what I need for a very basic demo, which I now have running on
my computer, but it still has a long way to go, esp. in terms of
usability. Therefore, the only publicly available stuff (if you don't
call the few files hidden in the GZigZag CVS tree on sourceforge
publicly available) are still the design studies from last summer. If
you are interested, you can look at them on
http://sourceforge.net/projects/zaubertrank . Also, at
http://www.zaubertrank.org/ , you can read another rehash of the points
presented in this post. ;)

So, I'd really appreciate comments on this. Am I making sense? Am I
underestimating the complexity of programming constructs if I think they
can be canned in natural language statements? Am I overestimating the
relevance of the "fear of math" factor? Please tell me what you think
(and which important questions I've left open)! Thanks. :o)
- Benja

P.S. In the highly unlikely case anyone on this list is interested
enough in this system to devote some time to it, especially by
discussing how to map programming abstractions to natural language, that
would be of course more than welcome. :)