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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,27b37ebdd75104b9,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-04 07:27:54 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!news-out.nuthinbutnews.com!propagator!feed2.newsfeeds.com!newsfeeds.com!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison Subject: Ada saves the day again: SETI Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 04 Jun 2001 10:27:00 EDT Organization: http://www.newsranger.com Date: Mon, 04 Jun 2001 14:27:00 GMT Xref: archiver1.google.com comp.lang.ada:8062 Date: 2001-06-04T14:27:00+00:00 List-Id: The following is a copy of a post I just placed in alt.sci.seti. This message is *not* crosposted there. I reposted it here because I thought it might be of interest to folks in c.l.a. as well, for fairly different reasons. For one thing, I think its a good example of how a sensibly-written Ada program can be much more robust than a C program with the same amount of effort. For another, its an example of an effective way to perform Ada evangelism: by writing a generally-useful Free program with it, and then giving the language credit when its inevitably due. Most of the folks reading this are *not* programmers. But they have now been exposed to a scenario where Ada clearly was the more reliable choice. BTW: The subject was missing fields in a SETI@Home text data file. In article <991566427.24959.0.pluto.c3ade7ed@news.demon.nl>, Kristofer Skaug says... >oops I take that back - according to the info on Roelof's SetiSpy homepage >it seems like it is very much intentional from S@H's side, a move to improve >security against "wu piracy"... Ahhh, you're right. The following excerpt from the latest SETI@Home tech news explains it: --- We closed the security hole with the side effect that several fields in the user_info.sah are now blank or zero. We realize that this is a problem for some very cool third party add-ons and are putting some of the fields back. --- As an aside: I don't spend too much space here pimping my favorite language, but this time I can't resist. This problem was noticed due to a reported bug in the SETI@Home Service, which is entirely written in Ada. Due to "the magic of Ada", I was able to find the source of the problem without ever touching a debugger. The automatily displayed error message told me the source file and line at which the problem occured, and that was all I needed. The basic bug in the service's web server was that I searched for a certian character in one of the lines of the file (a '(' ), and never bothered to account for the posiblity that it might not be there at all. If I had made this exact same mistake in C, a core dump (or "Dr. Watson") would almost surely have resulted. That would have terminated the service, and quite possibly the SETI@Home clients too. However, Ada allows me to account for the possiblity of unexpected errors, so that I can report them and recover. Thus all the SETI@Home service did when this bug occured was display a message detailing the source line of the error, and continue on like nothing had happened. In short, what would have been a nearly impossible to track down crash bug in C, became an easily isolated "hiccup" with Ada. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com