HELP! Must choose language!

Karl A. Krueger kkrueger at example.edu
Mon Dec 30 15:14:42 EST 2002


Nick Vargish <nav at adams.patriot.net> wrote:
> Maybe I was drawing too strongly on my own background; when I was in
> high school we were taught Pascal, because that was considered to be a
> good language for teaching the "mental discipline" and "techniques" of
> the day. I was already writing games for my Fujitsu Micro-8 and
> sharing them with a large audience, so Pascal was a cakewalk... But a
> lot of my classmates really struggled with it, as you did with C++.

I'd played with BASIC and Forth before high school age, but had Scheme
and Pascal in classes around that age.  At the time I took Scheme, the
summer program I was in was teaching intro CS in both Pascal and Scheme
sections, with the same final project:  to write an interpreter for a
simple arithmetic language.

As I recall, all of the Scheme students completed the project, with code
listings in the range of 3 to 5 pages.  Several of the Pascal class did
not complete it, and those who did had listings closer to 8-12 pages.  I
think that was enough to convince me that Pascal is not the greatest
language for learning.  :)

When I had Pascal the following year, the only real trouble was the
teacher's very sneaky trick questions, intended to teach careful
programming in a language that doesn't lend itself to same ...


> I'm just not convinced that _any_ programming language can really
> teach the discipline of solving the problem before a line of code is
> written. Maybe a class in geometry (proofs) would be a good start.

Boolean logic isn't in the usual American high-school math sequence,
which is a shame, but it's a better introduction to proofs than geometry
is, IMHO, since it is simpler:  the student doesn't have to learn as
complex of an axiom system at the same time that s/he is learning how to
do a proof.

Our intro CS classes required that programs be written on paper first,
and checked over, before being entered into a computer.  I understand
that's considered "old-fashioned", but it does ensure that students do
not learn the mistake that "if it compiles, it must be right".


> For someone who's never written a program before, _any_ language is
> going to be confusing -- even Python has a number of syntactic
> "tricks" that have to be mastered, such as '()' for tuples, '[]' for
> lists, and '{}' for dictionaries. Then the novice will want to know
> why a tuple is distinct from a list...

"A tuple is like an ordered pair in geometry.  You can have a lot of
different tuples, but you can't change one once you have it, just like
you can't change the meaning of the number 5.  5 is always 5, and (2,3)
is always (2,3).  A list is different -- it's like a shopping list, you
can add items to it and take them off, or change them."

I think the distinction between variables and values might be overall
more fundamental and more tricky for new programmers.  Python is a good
place to learn it, though -- as is Scheme, and as isn't C.  ("If &a is
the address of a, is that the address of the variable?  Is that the
variable?  Is that the address of the value?")


> In my opinion, Scheme is close to a language that teaches the basics
> of algorithm design and problem solving with a minimal amount of
> syntax. I find it quite lovely to work with, but most people think I'm
> insane.

Scheme's great for expressing algorithms that aren't about anything but
themselves.  It ain't so great for expressing algorithms that are about
other things out in the world or on the network, which is what Python is
good for.  :)

-- 
Karl A. Krueger <kkrueger at example.edu>
Woods Hole Oceanographic Institution
Email address is spamtrapped.  s/example/whoi/
"Outlook not so good." -- Magic 8-Ball Software Reviews



More information about the Python-list mailing list