From: Al Christians <achrist@easystreet.com>
Subject: Re: short-circuit control forms
Date: Thu, 21 Jun 2001 08:46:33 -0700
Date: 2001-06-21T08:46:33-07:00 [thread overview]
Message-ID: <3B3216D9.113A612B@easystreet.com> (raw)
In-Reply-To: 3B320D90.DD4BB9B2@ftw.rsc.raytheon.com
Wes Groleau wrote:
>
>
> If you are programming unconsciously, you are not
> doing software engineering. :-)
>
Sure. A software engineering project shouuld give explicit
consideration to all four possibilities: true & true, true &
false, false & true, false & false. But when someone is trying
to write and think at the same time: 'if A and ...' their mind
is focused by the form of the statement into thinking about what
else has to be true besides A for the action to be the right
action. You can't have too many things in mind at the same time,
and what happens if A is not true is easily excluded from
consideration as you write that statement.
The argument against automatically including the safety mechanism of
'and then' as the normal form is that it is misleading to someone
trying to draw inferences about preconditions from the code. If one
is doing the 'software engineering' you mention, why is one trying
to draw inferences about preconditions from the code? Don't 'software
engineering' projects generate 5-20 pages of documentation and
related paperwork per line of code? Isn't the information about
the preconditions going to be properly recorded somewhere in those
documents? If code is not documentation, why does 'software
engineering' mean that we have to code like it is, even to the
point of worrying about the possible but completely unjustified
inferences that may be drawn by some future code reader?
Wouldn't the best approach be to use 'and' most in testing, so that
as many exceptions as possible are detected in testing, but use
'and then' most in the delivered code, so that as few exceptions
as possible are detected by the customer?
Al
next prev parent reply other threads:[~2001-06-21 15:46 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-20 19:23 short-circuit control forms James A. Krzyzanowski
2001-06-20 20:15 ` Ted Dennison
2001-06-20 20:47 ` Marin David Condic
2001-06-20 22:23 ` Jeffrey Carter
2001-06-21 0:45 ` Al Christians
2001-06-21 15:06 ` Wes Groleau
2001-06-21 15:46 ` Al Christians [this message]
2001-06-21 18:28 ` Wes Groleau
2001-06-21 18:51 ` Marin David Condic
2001-06-22 12:17 ` Marc A. Criley
2001-06-22 14:55 ` Marin David Condic
2001-06-22 20:58 ` Robert Dewar
2001-06-22 21:49 ` Ted Dennison
2001-06-22 22:58 ` Jeffrey Carter
2001-06-23 0:38 ` Larry Kilgallen
2001-06-23 17:34 ` Simon Wright
2001-06-26 15:48 ` Wes Groleau
2001-06-25 17:00 ` Wes Groleau
2001-06-21 0:13 ` Mark Lundquist
2001-06-21 0:55 ` Al Christians
2001-06-21 12:39 ` Larry Kilgallen
2001-06-21 15:02 ` Wes Groleau
2001-06-21 14:24 ` short-circuit control forms (& 'long names are doom') Paul Graham
2001-06-21 17:20 ` Warren W. Gay VE3WWG
2001-06-21 18:32 ` Wes Groleau
2001-06-21 23:18 ` Charles Hixson
2001-06-22 1:01 ` Larry Kilgallen
2001-06-22 3:10 ` DuckE
2001-06-22 15:46 ` Wes Groleau
2001-06-22 19:02 ` Ted Dennison
2001-06-22 19:16 ` Ted Dennison
2001-06-22 20:53 ` Robert Dewar
2001-06-22 20:43 ` Robert Dewar
2001-06-22 22:34 ` Jerry Petrey
2001-06-25 14:30 ` Marin David Condic
-- strict thread matches above, loose matches on Subject: below --
2001-06-20 19:50 short-circuit control forms Beard, Frank
2001-06-20 20:35 ` Ted Dennison
2001-06-20 22:32 ` Jeffrey Carter
2001-06-21 1:18 ` Mark Lundquist
2001-06-21 17:05 ` Jeffrey Carter
2001-06-21 14:31 ` Wes Groleau
2001-06-20 23:45 ` Dale Stanbrough
2001-06-20 20:57 ` Marin David Condic
2001-06-21 7:31 ` Keith Thompson
[not found] <B6A1A9B09E52D31183ED00A0C9E0888C469BC4@nctswashxchg.nctswash.navy.mil>
2001-06-20 21:10 ` Wilhelm Spickermann
2001-06-20 22:20 Beard, Frank
2001-06-21 14:58 ` Marin David Condic
2001-06-21 17:11 ` Warren W. Gay VE3WWG
2001-06-21 17:49 ` Marin David Condic
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox