comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Strange error
Date: Fri, 23 Jan 2015 15:26:55 -0600
Date: 2015-01-23T15:26:55-06:00	[thread overview]
Message-ID: <m9ueav$of3$1@loke.gir.dk> (raw)
In-Reply-To: 3fa7d4c4-f9fe-4d00-9034-a348802087a9@googlegroups.com

"Laurent" <daemon2@internet.lu> wrote in message 
news:3fa7d4c4-f9fe-4d00-9034-a348802087a9@googlegroups.com...
...
> How do you professionals prevent such stupid errors? I am just a noob and 
> playing
> a bit around so it has no impact on anything.

You don't (or at least, I don't). I seem to write loops that don't loop 
(forgot the P := P.Next) all the time.

Probably the only real difference is that we're used to questioning 
everything: if faced with a Reverse_Print routine not working, we'd be 
quicker to consider that the input might not be correct. (Indeed, I'd 
probably start with that assumption, because the display routine is so 
simple.) But there is no certainty that we'll look in the right place.

That's, of course, one of the reasons we're interested in Ada, because it's 
possible to move more mistakes to compile-time checks. Bugs detected by a 
compile-time check never need to be debugged from results that might be hard 
to reproduce. (And as well, Ada lets us more easily put in runtime checks, 
which prevent problems from lingering.)

                                        Randy.




  parent reply	other threads:[~2015-01-23 21:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 21:46 Strange error Laurent
2015-01-23  7:45 ` Egil H H
2015-01-23  8:44   ` Laurent
2015-01-23 20:45     ` Laurent
2015-01-23 21:26     ` Randy Brukardt [this message]
2015-01-24  1:34       ` Bob Duff
2015-01-24 13:14         ` Brad Moore
2015-01-24 19:12           ` Laurent
2015-01-26 21:44         ` Randy Brukardt
2015-01-24  0:47     ` Bob Duff
2015-01-24 19:08       ` Laurent
2015-01-25  9:25     ` Stephen Leake
replies disabled

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