Re: Natural language programming?

From: Arthur J. O'Dwyer (ajo_at_nospam.andrew.cmu.edu)
Date: 11/09/03


Date: Sat, 8 Nov 2003 22:18:17 -0500 (EST)


On Sat, 9 Nov 2003, Alexander Schmolck wrote:
>
> Corey Murtagh <emonk@slingshot.co.nz.no.uce> writes:
>
> I can't resist playing a bit of devil's advocate.

Understood; I merely play the role of devil's devil's
advocate, then. :-)

> > A programmer MUST know certain things, or he is not a programmer.
>
> Well, that's a bit tautological, isn't it?

Naturally. All true statements are tautological to some extent. :)
I believe this is called the "No true Scotsman" argument in some
circles:

      No true Scotsman puts sugar on his oats;
      you put sugar on your oats;
 thus you are not a true Scotsman.

The question is, why is that argument somehow implausible, while the
similar syllogism

      No zebra is green;
      that animal is green;
 thus that animal is not a zebra.

is perfectly obvious and acceptable? [Pre-emptively snip long
philosophical argument going nowhere.] Corey simply thinks that
the statement "No programmer can be ignorant of [X]" (for some
value of X) is self-evidently true, while his opponent thinks it's
self-evidently false. [As the DDA, I note in passing that Corey
is a programmer not ignorant of [X], while his opponent is a non-
programmer apparently ignorant of [X], for many reasonable values
of X. So I don't know what his problem is. :-]

> > Sure, you don't need to know exactly how bits are manipulated during, for
> > example, a divide operation. But you do need to understand a whole bunch
> > of other things which the 'average' person is unaware of in order to
> > program effectively. Try doing anything interesting in programming with
> > only a layman's knowledge of boolean logic for example.
>
> Interesting to whom? To you? To the layman "programmer"?

Those categories almost certainly overlap so much as to be
equivalent for all practical purposes. Word-counting programs
are "not interesting"; good Reversi players, FFTs, and web browsers
are "interesting." Large gray area in between.

> This only demonstrates that "COBOL was an abortion" from the limited
> perspective of a professional programmer. I've (thankfully) never had to deal
> with COBOL, but I've been told that accountants and other non-programmers
> could look at COBOL code and get some reasonable idea what it did. So I can
> certainly imagine that this (for the intended uses of COBOL) would outweigh
> COBOL's frightfulness to programmers.

COBOL used a heck of a lot of magic numbers in the syntax itself --
e.g., it had sections labeled '1', '8', and so on, where maybe
section '8' would be for global variables, section '4' for code,
etc. (From vague memories of a For Dummies book -- don't trust
me on this.) Point is, COBOL was messy and inelegant "especially"
for normal people, not "even".
  Anyway, the OP was originally talking about REBOL. I don't know
if any relationship exists between REBOL and COBOL beyond the
similar names.

> > > Yes, to the computer it is a form of mathematics.
> > > But that does not mean that the human who handles the computer needs
> > > to use mathematical language to control it.
> >
> > Sorry, but you're dead wrong. However you express it, if you're doing
> > mathematics (which you invariably will for any complex computing task) then
> > you need to use mathematical 'language'.
>
> The OP denies (quite rightly) that handling a computer necessarily
> necessitates the use of a mathematical language (in the sense that a
> person on the street would classify something something as a mathematical
> language). Your only counter looks like another tautology.

It's hard to do a *lot* of programming without math.
However, it's true that not *all* programming requires math.
I would not be surprised if you could make a living doing
text-processing software and web design exclusively. But I
cannot immediately think of any other areas of programming
that don't require at least basic college-level math of one
sort (cryptography) or another (3D game engines) or another
(image compression) or another (spread*** design) or
another (CAD prototyping).

> > Feel free to express it in English, if you like, and if you can
> > find the terms to do so.
>
> Would the following be OK as a specification of a complex computational
> task in English:
>
> "Remove red eye artifacts from all the pictures of people that I stored
> on my hard disk within the last two months."

Sure, as long as your computer understands that kind of language.
But at that point, are you "programming," or are you simply "using"
the features provided by Real Programmers [tm] who work behind the
scenes on the fuzzy-logic circuits and the natural-language parsers
and the red-eye removal filters?
  I would contend that if computers ever become *that* advanced,
we'd see an even wider gulf form between Programmers and Users.
At the moment, we have the guys who drive the cars, and the guys
who build the cars -- tool users and toolmakers. Let software become
powerful enough to reliably perform the kinds of tasks you're asking,
and we'll soon have the guys who talk with their secretaries, and the
guys who *create* the secretaries -- essentially normal people and
demigods.
  Yup, ph33r us now. ;-)

> > > Most people could program computers if we use high level natural
> > > language-like language to program them.
> >
> > Almost anyone can learn to program a computer using existing computer
> > languages. Changing the representation of the language isn't going to make
> > it more accessible, since the algorithms and so on do not change.
>
> So machine code is equally accessible, as, say visual basic?

I don't think Corey meant that anyone could learn *any* language he
wanted; simply that with the current proliferation of real, useful
languages (C, Perl, Java, VB, Befunge, various machine codes, ML,
Haskell, Python, Ruby, Eiffel, Prolog, Matlab...) it is quite easy
for a beginner to pick up at least *one* of these languages that
he can use effectively with a little practice.

> > The number of elitist programmers who are
> > actively trying to make programming harder for everyone else to learn is
> > insignificant compared to the number of programmers who don't give a ***
> > whether you learn it or not.
>
> I find this assertion quite plausible. Have you never come across geek
> vocabulary like "luser" or witnessed displays of (somewhat ill-conceived)
> geeky pride on having mastered the idiocies of C++/perl/unix/etc. (at a
> considerable sacrifice of life-time)?

Did you mean "plausible" or "implausible"? I assure you, one's
calling a newbie funny names doesn't necessarily mean one is part
of the Vast Underground Conspiracy to keep computers out of the
hands of the masses.
[If I told you anything else I'd have to kill you.]

:)

-Arthur,
qbrf ebg guvegrra pbhag nf n frperg ynathntr?