Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Required common programming language



I'm being a Devil's advocate here, I know, but in this case I'm really
on the Devil's side. Let me comment on just three of Frank's parries:

Leigh writes (in part, I'll edit to take him out of context)

...and that some attention
should be paid to the virtue of the inclusion of the GO TO statement in
any reasonable language. Furthermore they should be told that no one is
ever going to read their code,

There is no virtue to the GOTO. I wrote a technical word processor in Atari
Basic with machine language routines in critical spaces for speed. I
couldn't
read my own code today to save my ... life! It was spaghetti. It needed
to be
compact because of space and speed considerations that are no longer
necessary.
Structured programming with clean modules provides reusable modules and the
ability to re-use an old wheel from time to time. If you can't read it 3
months later, you can't modify it for a new task AND it may well have done
some
things you couldn't see buried in the spaghetti.

I omitted an important word there, and I apologize if it obscured my
meaning. I meant, and should have said "some attention should be paid
to the virtue of the inclusion of the GO TO statement in any reasonable
*first* language." That was what I thought we were discussing, and that
is the thrust of my piece.

It might happen that one writing a first computer program has no need
to reuse that code. Might I suggest that even you had no need to reuse
the code you wrote in machine language for the Atari? [Brag warning]
The same son I told you about has been using Macintoshes for 14.5* years
and is very talented. While working for Bill Gates he once made an
improvement in an early version of Word that chopped 75% off the refresh
time in one of them. As I said, he learned by an utterly different route
which was similar to my own, and he now writes beautiful structured code
in C++ and Java, only as a diversion from his real work, I'm pleased to
be able to say.

We old codgers never took programming courses, and still we
learned. I got a copy of McCracken and a key punch and went to work. It
didn't take long to get that first thrill, I'll tell you. Why should
others be deprived of it by having unnecessary obstacles placed before
them because they are so unfortunate as to have to learn structured
programming and to spend time writing grammatically correct documentation
for the eyes of a teacher?

I learned it the same way. That doesn't mean it was the best way, just
what we
did in those earlier times. Having lived through that time AND enjoyed
programming as you did, I still enjoy it, but the structure gives it an
additional beauty with the practical result that I can even read it a few
months later.

I like to think that my construction of English prose is superior to my
writing in elementary school. I probably write things today that I would
have been unable to read when I was eight years old (or at least I hope
I do). That doesn't mean that I would have got to this stage of writing
faster, or written better, had I learned to write correctly when I was
five years old.

I am not saying that structured programming is in any way "bad." I wrote
structured programs in APL and Fortran II; I know no language in which
I can't write structured programs, and certainly structure has all the
advantages you claim for it. I'm saying that I don't think it is
necessary to start out programming that way, and that the GO TO statement
(the elimination of which was the proudest achievement of Pascal) is a
perfectly good, useful tool. So is the word "ain't"!

The point here is this: computer programming is not necessarily something
that has to be taught. Like other language, with a facility for
communication (access to other speakers of the language or to a computer)
the student will naturally learn by himself. Later on, as we do in English
composition classes, we can teach him the refinements which are
undisputably valuable. As has been pointed out several times, learning yet
another language at this point is usually very easy.

I'm not sure I agree here. I had a student last year in a problem solving
course using Quick Basic. This student had (I'm convinced) been brain
damaged
by excessive exposure to the GOTO. He wrote one of the most convoluted
complex
pieces of code I ever saw to do a rather simple and straight forward
programming assignments. Not only wasn't it reusable or extensible, it was
unreadable!

Well Frank, I notice that you didn't say that it didn't work. From the
student's point of view that might be less important than pleasing the
teacher, but from the learner's point of view, if the code compiled and
ran, he might well have achieved his goal anyway.

Leigh

*If you know the history of Macintosh that will surprise you. No, I don't
mean Lisa; I mean Macintosh. It may surprise you to learn that the first
computing I did was done on a home computer in 1956. The home belonged to
Harry Huskey of the University of California Electrical Engineering
Department. The machine was his Bendix G-15, and you can see that very
machine on display in the Smithsonian (unless it has been removed in the
last three years).