On Apr 28, 5:36 pm, Ivan Godard <
i...@ootbcomp.com> wrote:
> On 4/28/2013 2:04 PM, Paul A. Clayton wrote:
[snip]
>> Hmm. It seems that _some_ aspects of "development
>> environments designed to" *promote* "correctness"
>> would improve productivity even if 'seems to work' is
>> considered good enough.
[snip]
> You, sir, are an optimist.
Perhaps an optimist with respect to what is _possible_;
I am more pessimistic (i.e., more realistic--sigh)
about what is likely to happen (even in that sense I am
optimistic in estimating the improbability of a good
result, but with respect to actions the difference
between 5% or 0.5% and 0.000_005% is that a niche [in
time and/or application] use is perhaps likely in the
former probability and so the change might be worth
pursuing).
> Every writer of compilers is familiar with the bug report that begins:
> "My program used to work fine on compiler version X-1, but now on
> version X it's giving me an error message. Didn't you test version X
> before you released it? Now I have to roll back the installation until
> you fix this bug."
My claim (such as it was) was that productivity (even
with the "seems to work" target) could be improved--not
that the programmers who accept "seems to work" would
eager or even willing to embrace such a change. Those
that did embrace the change would (I am guessing) find
that development (which includes maintenance and
enhancement) is less frustrating and faster.
It is quite possible that conversion tools could be
made to translate source code (similar to "software
rejuvenation" except that a mode might be provided to
allow guesses as to the original intent of the code so
that ambiguous cases could be handled automatically,
which those targeting "seems to work" might prefer).
The cost of "upgrading" *programmers* would be
substantial, but even with that cost (including lost
opportunity costs) I suspect a net gain in
"productivity" would be possible. ("Unfortunately",
at least some of these "upgraded" programmers would be
infected with clearer thinking and a desire for
excellence, and so would rebel against the "seems to
work" target
> You might not know that early versions of C, favored by such users, gave
> fast compilation by assuming that the source code inputs were correct
> and doing no diagnosis at all. This approach persists to this day, in C
> programmers if no longer in C compilers.
Compile-time errors are annoying (and presumably less
development-friendly than edit-time error checking).
Edit-time error checking could highlight the error
when the programmer is presumably closer to the context
of the error (Yes, some "errors" would be more like
enhancement requests--some of which errors might be
downgraded by producing a dummy function or so the code
becomes valid [requiring warnings/errors for such
dummy functions just as some languages have warnings/
errors for using "obsolete"/"deprecated" interfaces].).
Such error reporting might be through highlighting so
that bursts of coding could be accommodated, and many
errors could be automatically corrected or provide a
quick "Did you mean X?" (or "X, Y, Z, or something
else?").
(With a well-designed language, it should be possible
to do much better than the spell-checking and grammar
checking of existing word processors do for English
not only in discovering errors but in correctly
recognizing the intended/correct expression.)
(It does seem, however, that even the English
spelling/grammar checking could be much better both in
sophistication of analysis and in the interface [e.g.,
autocorrecting based on probability--"micorarchitecture"
is almost certainly meant to be "microarchitecture" but
"arche tecture" _might_ have a significant possibility
of meaning "arch texture" though personal and document
context could usually refine the probabilities--,
providing a faster means of examining and applying
alternative text, and providing quick and simple access
to short--but easily expandable--definitions and usage
information.)
This seems to be consistent with the agile programming
philosophy of fail fast.
With relatively abundant memory and processing power,
providing a sophisticated development environment
should be more practical in 2013 than it was in the
1970s or 1980s (or even the late 1990s).
> Of course, it is possible to go too far in the other direction. Like
> many compilers, the Univac 1108 Fortran compiler would count diagnostics
> and break off after some number (assuming that it was irrecoverably
> lost) and put out a final diagnostic "Not all errors were reported". We
> had a program for which the *only* diagnostic was "Not all errors were
> reported".
"Compiler stopped from running in circles waving its
arms and screaming." might have been a "better"
message than the sole diagnostic of "Not all errors
were reported" (though such a humorous message might
make some programmers feel laughed at rather than
laughed/cried with).