From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,37e683828bae12e2 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,37e683828bae12e2 X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,b0b9a5eaad4ab6eb X-Google-Attributes: gid1164f8,public X-Google-Thread: f8c65,37e683828bae12e2 X-Google-Attributes: gidf8c65,public X-Google-Thread: 1008e3,37e683828bae12e2 X-Google-Attributes: gid1008e3,public From: Ruud Bruijnesteijn Subject: Re: [++] Tight coding Date: 1998/03/04 Message-ID: <34FC9F86.DB31737B@sds-sportdata.com>#1/1 X-Deja-AN: 330580578 Content-Transfer-Encoding: 7bit References: <6csl81$rb9@news-rocq.inria.fr> <34F3B7C5.5FD1@earthlink.net> <34F49435.B6307838@hda.hydro.com> <6dbgjv$lg$1@andros.cygnus.com> <34F97152.DBF199BD@sds-sportdata.com> <6dcdvp$6oa$1@mainsrv.main.nc.us> <34FB377C.C54C0FCE@acm.org> <34FB49B0.DF95B725@sds-sportdata.com> <34FBF347.98CB012B@acm.org> X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Organization: SDS Sport.Data.Systems GmbH Mime-Version: 1.0 Newsgroups: comp.sys.dec,comp.lang.c++,comp.lang.c,comp.lang.modula2,comp.lang.modula3 Terry Moore wrote: > > In article <34FBF347.98CB012B@acm.org>, Pete Becker wrote: > > > Ruud Bruijnesteijn wrote: > > > I think there is > > > > This assertion of faith is not at all useful. If you have actual data > > please say so. "I think there is..." means nothing. > > Conversely, being negative about these ideas without data to > back this point of view, is equally meaningless. > I take "I think" to mean that he has seen such literature but > cannot give a reference off hand. Well, nor can I, but there > must be a better way to program than the try-it-and-hope-it-works > principle that is used so much now. Yes I have seen literature, No I do not have it at hand. So, from my own expierience I can say that: Doing a 190KByte program in Borland C++ (not the worst of devellopment environments I know) took me 3 months. Doing the same program from scratch WITH decent stepwise refinment and on the fly proof for correctness in TopSpeed M2 (Almost as good as Turbo) took me 3 weeks. In fact, it took as much time to type in version A as it did to type version B. However, once that was done, it took me 7 weeks with version A to test (and debug) and 3 days with version B. In fact, after 3 weeks of testing A) we started thinking of throwing the whole damn thing away and start anew. It took further 3 more weeks to finaly take that decision, i.e. as long as it took to redo the entier program! OK, so I AM more fluent in M2 than C++. Still I know at least two other companies in my direct vincinity, that based on lenghty discussions with the software division of my company on programming techniques in general, have adopted a more formal approach to programming, and they have achieved comparable results. One (advanced image recognition) whilst switching from c to pascal, the other (workstation CAD/CAM) decided to stick to C++. However, all three of us have concluded that the number of bugs found at runtime (i.e. when the product is being tested, or even when installed on site with their customers) calculated for more than 60% of the total time for devellopment of the product (i.e. from time of conception of the algorithm to time of delivery) and this can be reduced to approx 10% of total time once proper proving was performed. Yes, there were STILL bugs left, because, as stated earlier, the human factor cannot be ruled out. However, these bugs were mostly due to using mixing up variables or forgetting to properly initialize them. Some compilers would have warned of the latter one, bound-checking catched the others within a couple of minutes. As one of our staff uses to say: Once I find one or two bugs, I can asume it's the odd mistake. Once I've found nr. 10, I can no longer assume that there will be no more, in fact I now know for sure that there will always be one more, and the entier program has to be seriously questioned. -- Ruud Bruijnesteijn SDS Sport.Data.Systems GmbH http://www.sds-sportdata.com