comp.lang.ada
 help / color / mirror / Atom feed
* Ada saves the day again: SETI
@ 2001-06-04 14:27 Ted Dennison
  0 siblings, 0 replies; only message in thread
From: Ted Dennison @ 2001-06-04 14:27 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-04 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-04 14:27 Ada saves the day again: SETI Ted Dennison

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