Re: Do you believe that the Plain English language is better than Ruby language?

Peter Hickman <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CALxYQy6ghghLjQk7iT8eNi48vNnqdGYA1uujcnFbShL6qniJZQ@mail.gmail.com>
On Fri, 22 Feb 2019 at 18:24, Quantum Robin <[email protected]>
wrote:

> I want to know why the Robert Klemme said that the Plain English is not a
> programming language.
>
>
I'm not Robert but my explanation is probably as good as any. As a native
English speaker and programmer with over 30 years experience I found the
English used in the 300 line example to resemble something written in
another language and passed through a bad machine translation application.

For example:

> Slap a rider on the buffer.

What is a "rider" here given that you have not defined it? Do you mean
picture of a jockey (given that this is a drawing application) or "a
statement that is added to what has already been said or decided". The
later case could be read as a conditional operator such as the unless in
the following code. But I suspect that this is not what you mean

(1..10).each do |x|
  puts unless x % 2 == 0
end

What do you mean by buffer. An image buffer or just a reserved chunk of
storage to read input into (and hopefully not overflow)

> Move the rider (Googley image rules)

How? Up, down, left, right or a combination of up and left? How do we
decide how we should move? "Googley image rules" means absolutely nothing
here

> If the rider's token is blank, exit

Hang on here. A "rider" can have a token! What is a "rider" that it can
have a token? My understanding of the English term does not associate
"token" with "rider" in either of it's forms I gave earlier. Neither does
it work with definition of "a small weight used to fine tune a balance".
Also where did this token come from?

One feature of natural languages is that they are basically sequential
(notwithstanding verbs in German). You build up your understanding of the
subject by reading from the start. Each sentence / paragraph builds
understanding NOT ambiguity

This is only 30 lines into the program. At line 226 I also discover that a
rider has a source. Another thing that does not fit with my model of a
rider. TL;DR rider is never defined anywhere. I don't know what it is

> Add 1 to the rider's source's first.

In English "rider's source's first" needs another term. First what? This
isn't a complete English sentence

> Position the rider's token on the rider's source

I don't know what a rider is. I don't know what the token property is, or
the source. But "Position" seems like a drawing command so I'm even more
confused as to what a rider is. You can position the rider's token on the
rider source. Is the source an image or bitmap perhaps?

Finally, 300 lines for a drawing program? I'm sure that there are Perl
programmers out there that could write it in one, but then they never
pretended you would be able to read it :) I'll take concise and
incomprehensible over verbose and incomprehensible any day


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.