9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ... in the Kingdom of Sources
Date: Thu, 11 Sep 2003 19:04:27 +0200	[thread overview]
Message-ID: <20030911190427.A2507@cackle.proxima.alt.za> (raw)
In-Reply-To: <f11a34849d01662f0de4dd1a50795fa5@mightycheese.com>; from rob pike, esq. on Thu, Sep 11, 2003 at 08:48:43AM -0700

On Thu, Sep 11, 2003 at 08:48:43AM -0700, rob pike, esq. wrote:
>
> precisely.  the approach taken by the C standard implies you're
> supposed to error check the conversion and presumably yell about it,
> maybe exit.  but the great majority of text processing code is
> interactive - editors, browsers, terminal programs - and must soldier
> on.  the `error rune' solution not only solves the problem of
> soldiering on, it provides a way to yell and takes no code at all in
> the application.  (if you really want to stop processing on errors,
> it's still a simple check; it's just that you almost never have to
> bother to check and i can't think of a single program that does.)
>
I'm willing to concede rob's point.  In an interactive environment
error checking is counterproductive if a user response would be
preferable.  But you can't design a standard around "the great
majority of text processing code" without sacrificing the ability
to deal with the exceptions.

I've done a good deal of programming using Don Libes' Expect and
it's quite a lesson in the cost of relying in real intelligence to
deal with contingencies.  MS Windows programming really brings the
point home: there aren't many operations I would feel comfortable
automating unsupervised.  Whereas forgetting the "close" function
in a pop-up error message isn't too serious, being unable to detect
an out-of-memeory or out-of-disk-space condition in a background
task can be catastrophic.

I had a print spool completion pop-up appearing at the same time
as the screen saver Ctl-Alt-Del prompt pop-up: I didn't have to
identify myself before acknowledging the print completion, for
example.  Is something like that worth worrying about?  Not really,
but is not perhaps symptomatic of a programming style where all
contingencies are passed on to the user except when the user isn't
available, in which case they are merely glossed over until disaster
strikes, at which point the RESET button comes to the rescue?

Whereas in Plan 9 (and Unix) it is easy to distinguish between
interactive tools and command line utilities, in Windows the
distinction is very thoroughly and almost certainly intentionally
blurred.  In my experience very few Windows programmers actually
code with unattended, unsupervised operation in mind.

I think Doug's concerns, like mine, are in laying down rules that
make it possible to deal with the unexpected programmatically.
The ANSI-C committee, like the ITU-T, seemingly strive to remove
all possible ambiguity instead of relying on the human brain to
make a choice.  It is a sane approach to dealing with computers,
even though the compromises made in this quest may be atrocious
and, I'm sure, occasionally mistaken.  As compromises have to be,
when trying to address conflicting requirements.

What may help considerably is the acknowledgement that different
needs can be addressed by different solutions.  For example, Perl
is a prime example of a language designed to concoct one-off
solutions.  Some of us have to do this on a regular basis (I know
of one instance where data conversions from continually changing
formats is a daily occurrence) whereas others can indulge in
monumental works to be used for decades.  Writing monumental works
in Perl should be discouraged, I'm sure, while Limbo may be quite
unsuitable as an instrument to write short sysadmin scripts.

Another point worth raising (I think it was Geoff Collyer who first
pointed it out) is that graphic programming is still at the level
of assembly code.  A lot of the decision making in interactive
programming is similarly at a very low level and therefore seems
extremely cumbersome.  Somewhere, somehow - I'd expect rob to be
the likely genius to come up with something - somebody will have
the flash of inspiration that leads to second and third generation
graphic languages.  Until then, I think we have to accept that we
don't have sufficient grounds on which to construct "standards"
that address the real problem, we can only base our recommendations
on traditional principles that are undoubtedly obsolete.

++L


  reply	other threads:[~2003-09-11 17:04 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-05 11:54 David Presotto
2003-09-05 12:14 ` Lucio De Re
2003-09-05 12:33   ` boyd, rounin
2003-09-07  9:00     ` Aharon Robbins
2003-09-07  9:05       ` boyd, rounin
2003-09-08  9:10         ` Douglas A. Gwyn
2003-09-08  9:52           ` boyd, rounin
2003-09-08 17:33           ` rob pike, esq.
2003-09-09  8:34             ` Douglas A. Gwyn
2003-09-09 15:50               ` rob pike, esq.
2003-09-09 15:50               ` rob pike, esq.
2003-09-10 10:17               ` Bruce Ellis
2003-09-11  9:07                 ` Douglas A. Gwyn
2003-09-11 13:06                   ` rog
2003-09-11 14:01                     ` Lucio De Re
2003-09-11 14:25                       ` rog
2003-09-11 15:17                         ` Lucio De Re
2003-09-12  9:18                         ` Douglas A. Gwyn
2003-09-11 15:48                     ` rob pike, esq.
2003-09-11 17:04                       ` Lucio De Re [this message]
2003-09-11 17:40                         ` chris
2003-09-12  4:13                           ` boyd, rounin
2003-09-12  9:18                           ` Douglas A. Gwyn
2003-09-12 15:18                             ` rob pike, esq.
2003-09-12 16:39                               ` rog
2003-09-12  9:18                         ` Douglas A. Gwyn
2003-09-12  0:56                     ` Bruce Ellis
2003-09-11 15:42                   ` rob pike, esq.
2003-09-12  1:18                     ` okamoto
2003-09-12  9:18                     ` Ralph Corderoy
2003-09-12  9:57                       ` Bruce Ellis
2003-09-15  8:27                         ` Douglas A. Gwyn
2003-09-12  3:53                   ` boyd, rounin
2003-09-12  3:01               ` Dan Cross
2003-09-07 13:48       ` Russ Cox
2003-09-07 15:45         ` David Presotto
2003-09-06 11:13   ` boyd, rounin
  -- strict thread matches above, loose matches on Subject: below --
2003-09-05 12:04 David Presotto
2003-09-05  6:39 lucio
2003-09-05  6:31 ` Lucio De Re
2003-09-05 11:30 ` David Presotto
2003-09-05 11:42 ` David Presotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030911190427.A2507@cackle.proxima.alt.za \
    --to=lucio@proxima.alt.za \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).