From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Strange error Date: Fri, 23 Jan 2015 15:26:55 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <713608f7-d46e-4b73-a34e-552d1b978d2c@googlegroups.com> <01fc779f-e274-4515-a88f-144d515d323f@googlegroups.com> <3fa7d4c4-f9fe-4d00-9034-a348802087a9@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1422048415 25059 24.196.82.226 (23 Jan 2015 21:26:55 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Jan 2015 21:26:55 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.giganews.com comp.lang.ada:192029 Date: 2015-01-23T15:26:55-06:00 List-Id: "Laurent" 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.