ActionScript as a teaching language

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Mon Jan 2 17:01:25 UTC 2006


| From: Paul King <pking123-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org>

| On 1 Jan 2006 at 21:12, D. Hugh Redelmeier (D. Hugh Redelmeier <tlug-lxSQFCZeNF4 at public.gmane.org>) spaketh these wourdes:
| 
| > | From: Paul King <pking123-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org>

| > | This is why I wouldn't teach Python, because the scoping would not be obvious |
| > enough.
| > 
| > Why is it not obvious enough?  I admit to knowing too little about Python.
| > 
| 
| I was shown Python by a farirly keen programmer several years ago, and I remember 
| that it seems that instead of parentheses or begin/end, Python appears to use 
| only indentation to indicate scoping. While as a programmer I thought it was kind 
| of neat, and may even force a bit of good form into programming (imagine a 
| printout of a nicely-indented program being handed in for once), I still think 
| that a beginner needs something less subtle to see where variables have an effect 
| and where they don't, even sacrificing good form (they would still have to have 
| good form to get better marks). That may be just me.

I think that indentation is a very reasonable way of indicating scope.
The main problem with it is people who learned BEGIN / END or { }.
Your students ought not to be in that condition.

Lots of folks first see Python's use of indentation and recoil.  I've
not heard of problems once people try it.  (I admit that this is not
an air-tight observation.)

Scope is a tricky concept, but the syntax of it isn't (I admit that
it can be made tricky by bad language design).  Dynamic scope
vs static scope is the main tricky point.  I think that static scope
is the only sensible choice; this is where Logo falls down.  I don't
know which Python uses.  The concept of "closures" is quite
interesting but probably not part of the curriculum.

Example of bad language design involving scoping:
On the C++ core language mailing list right now, there is a thread
about scope.  Here is a bit of the first message.
	void foo()
	{
		std::string s = s + "Yecch!";
	}
  This seemingly innocent example yields undefined behavior because it
  initializes s from its uninitialized value.


| > Perhaps the problem is the curriculum.  Without knowing it, I really
| > cannot be sure how you can satisfy it.  I do suspect that many
| > teachers are just ignoring it.
| 
| The curriculum is not language-specific, although I also suspect that many parts 
| of the curriculum are being ignored as well.

The curiculum is likely based on "world view".  Some problems don't
exist in other world views.  This is not always the same as solving
the problem.

Example: the concept of "undefined variable" is missing in some
languages because all variables are born initialized to a neutral
value.  This does not magically fix logical errors.

Example: some languages are strongly and statically typed and require
programmers to work harder.  This adds a fair amount of complexity to
the language.  Some folks (I'm one) like the resulting error checking.
Some find it a waste of time.  It is a barrier to entry for beginning
programmers.

Example: managing memory is a fairly difficult task in an reasonably
sized program.  It is also error-prone.  In Java, the details are
handled by garbage collection.  But the Java programmer must make sure
not to maintain a useless reference, a task he may not be equipped to
do.

I would guess that Turing has a great match for the curriculum.  I
expect Holt had some input in setting the curiculum and that he
designed the language with the curriculum in mind.  But that was 15 to
20 years ago.  Maybe things have changed.

| It is not a core course, and so 
| students need to be attracted to it. They don't "need" to take it.

A good argument for Flash!

About fifteen years ago, my wife intrigued a bunch of elementary
school kids with HyperCard on the Mac.  Flash could be similar (but
more current).

Most scripting languages are a bit sloppy for my tastes.  There seems
to be a life cycle in most successful scripting languages:

- start as quick and dirty [enable amazing small programs]

- slowly repent and correct sloppy design [large programs were a
  painful to build, to get right, and to be sure they were right]

The problem is that it is very hard to make a language more strict
without hurting your customers -- all their old programs break.

I have no idea where ActionScript is in this life cycle.

| The LCSI link seems to be a good one. I like the fact that it says that these are 
| *constructivist* tools, since constructivism is now the new educational "flavour 
| of the month".

I'm not sure what "constructivist" means in education (I know that I
could Google).  I can guess.  I bet it is what Papert has been
talking about for 40 years.

LCSI was founded by Seymour Papert, his students, and others.  Papert
is well known as one of the inventors of Logo and as the author of
Mindstorms and other important avant garde educational stuff.  He was
an actual student of Piaget.  So there is a pretty respectable
heritage there.

| I am curious as to how they see programming as being covered in a 
| constructivist manner. I would have thought that programming itself is 
| constructivist anyway, regardless of the language. CS is inherently hands-on, and 
| when you have a bug or syntax error, you learn from your own mistakes. You can't 
| get more constructivist than that.

Last I talked with LCSI folks (ten years ago), they were not dealing
with programming as an overt goal.  Kids were using programming in
Microworlds to accomplish other tasks.  I don't imagine that any of
their material is directed at a programming course.  That did not
prevent Microworlds being used to teach programming.

Example (that I am making up):
When a student is using Microworlds for (say) modelling a physics
problem, Microworlds directs/enables them in a Constructivist way.

High school students may find Microworlds' surface is aimed at too
young an audience.  It may well put them off.  I know that there is
serious stuff underneath, but that may not be apparent to the
students.


One tough problem in CS is to find good motivating problems.  Maybe
Constuctivists would focus on that.  Teaching syntax for its own sake
might be the opposite approach.

For young kids, the Logo turtle was a wonderful come-on.  Maybe flash
would do the same for ActionScript.


I don't know enough about what you are hoping to do to recommend a
particular language.  Mostly I've been trying to point out that
Logo and LISP are not mistakes for the reasons you mentioned.
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list