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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 08 Sep 2004 20:01:42 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <49dc98cf.0408110556.18ae7df@posting.google.com> <6F2Yc.848$8d1.621@newsread2.news.pas.earthlink.net> Subject: Re: ADA Popularity Discussion Request Date: Wed, 8 Sep 2004 20:02:36 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-N1QRR+FgXPt5zgfxxqIRK1TcgQdoBaDo7igOX9vr1pKMHyZ++yMZT3mpA5YpsImpsAkEks0PirCIeAa!+Vl4qwS2faG7slHVQO6Qwpn2dZMKb7qZv3UtWFcxYO6lKCedj4Uon3zVCmsGL+BYxY5pnpyXJgQs X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.13 Xref: g2news1.google.com comp.lang.ada:3518 Date: 2004-09-08T20:02:36-05:00 List-Id: "jayessay" wrote in message news:m3k6v6dwbn.fsf@rigel.goldenthreadtech.com... ... > You can't. Because the sort of snippets I'm discussing are not even > legal programs in things like C++/Ada/Eiffel/etc. > > How do you do stuff like this: > > ;; Does the log reader return the correct forms for a log file > (alice:read-unanswered-log "../alice-unanswered.log") > > You can simply ask Lisp to try this and see the results > > ;; Is the format properly formed for output to a client bin widget > (with-open-bin (:bin-id 1440691622 :session-number 12) > (put-bin (alice:read-unanswered-log "./alice-unanswered.log"))) > > Same here - but this will also go over to a connected client and you > can see if all that protocol is correctly working. Cute, but close to useless in my view. A test that doesn't have the results included in it (and preferably is automated to return Pass/Fail), or that isn't saved for future use, is just wasted effort. When the function in question is updated a year from now, you'll either have to recreate the entire set of tests, or simply forget the testing -- and either way you'll end up wasting a lot of time. Moreover, this sort of stuff is fine for simple functions, but it doesn't scale to subsystems, where there are many paths and options to test. And it is at the subsystem level where virtually all logic errors occur - it's hard to make a mistake in a three line function! >> But why do you assume that static typing replaces the need to test >> every corner of the software? > I don't. Obviously it doesn't. No one believes that it does. You > are hacking at a strawman. OK, let *me* hack at the strawman. The goal of programming languages ought to be to eliminate the need for testing. This is not a goal that is likely to be achievable, but the closer that we can come, the better. On low-criticality systems like the Trash Finder spam filter, I don't even bother to test updates anymore. I simply load it onto the mail server and check the logs occassionally for problems. I can do this because I have confidence in the design of the program that it will log any faults and save the offending message for testing any fix needed. I consider testing a last resort to use when you can't find any better way to insure the correctness of your software. Of course, in practice, you do have to use that last resort for time to time. Randy.