comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Length of unbounded_string.
Date: Thu, 27 Oct 2011 13:28:39 +0200
Date: 2011-10-27T13:28:39+02:00	[thread overview]
Message-ID: <4ea94067$0$6625$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <m2r51yq0bx.fsf@pushface.org>

On 27.10.11 10:56, Simon Wright wrote:
> "Randy Brukardt" <randy@rrsoftware.com> writes:
> 
>> Even people who should know better do it (and I know I have,
>> too). It's a pain to create a reproducing example, but a lot of time
>> when I do that, it becomes clear what is wrong (and it often is
>> "operator error"!).
> 
> Me too.

A natural extension of this phenomenon into the workplace seems to
be writing tests. Whenever packages or types can be tested in
isolation, there will be additional benefits. Like pieces of source to
hand over to the help desk. The additional benefits are
without additional effort, since they flow naturally from the
design and development of tests.
(I'm partly forced to work in this way using Python, since even
pylint's results are not always close to the diagnostic powers
of an Ada compiler; however, there is even more incentive to do
the same when writing Ada. A win-win situation.)

Some additional benefits, I think, in no particular order:

*) test cases increase the likelihood of isolated pieces of
   software that can be forward to help desks

*) writing tests means documenting and verifying assumptions.
   This resembles the "detect early" argument associated with Ada:
   "Ouch, I had thought this type behaved such-and-such, and not
   that way ...!" Knowing what you are assuming seems better than
   the opposite, and the sooner you know it the better.

*) Thinking is needed to write tests, therefore doing so clarifies
   understanding during development. Even later, software is more
   clearly understood by readers, since test cases are manifestations
   of thinking.

*) done properly, I think test cases will improve decoupling of modules,
   because developing one test should neither impede nor be impeded
   by developing others. Perhaps even because testing forces to
   concentrate on separating things for testing.

It has taken a bit of patience and getting used to, but writing
tests early seems well worth it. With or without "formal methods".



  parent reply	other threads:[~2011-10-27 11:28 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-25  9:37 Length of unbounded_string ldries46
2011-10-25 17:57 ` Jeffrey Carter
2011-10-28  2:54   ` ldries46
2011-10-28  4:55     ` Jeffrey Carter
2011-10-25 20:23 ` Vadim Godunko
2011-10-25 21:28   ` Simon Wright
2011-10-26  4:41     ` Simon Wright
2011-10-26 22:47     ` Randy Brukardt
2011-10-27  8:05       ` AdaMagica
2011-10-27  8:56       ` Simon Wright
2011-10-27 11:05         ` Brian Drummond
2011-10-28  3:12           ` ldries46
     [not found]           ` <4eafc489$0$3081$703f8584@textnews.kpn.nl>
2011-11-01 18:22             ` Jeffrey Carter
2011-10-27 11:28         ` Georg Bauhaus [this message]
2011-10-27 12:17           ` Dmitry A. Kazakov
2011-10-27 13:31             ` Georg Bauhaus
2011-10-27 14:34               ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2011-10-16  8:48 ldries46
2011-10-16  9:59 ` Niklas Holsti
2011-10-16 12:06   ` ldries46
2011-10-16 12:52   ` ldries46
2011-10-16 13:00     ` Niklas Holsti
2011-10-17  7:39       ` ldries46
2011-10-17 19:49         ` Niklas Holsti
2011-10-18 11:47           ` ldries46
2011-10-18 17:54             ` Niklas Holsti
2011-10-19  2:38               ` ldries46
2011-10-19  6:07                 ` Niklas Holsti
2011-10-24 15:10                   ` ldries46
2011-10-19  6:37                 ` Simon Wright
2011-10-19 14:48                 ` Alex Mentis
2011-10-24 17:04                   ` ldries46
2011-10-16 10:14 ` Vinzent Hoefler
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox