Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed101.telia.com!starscream.dk.telia.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Paul E. Bennett" Newsgroups: comp.lang.forth Subject: Re: Function Points Followup-To: comp.lang.forth Date: Mon, 27 Aug 2012 12:14:12 +0100 Organization: Hidecs Consultancy Lines: 40 Message-ID: References: <2bebf6e6-dab7-4134-904f-a57e90765fd3@googlegroups.com> <8545a450-d245-46ea-93cf-0b34a7bdbf8d@googlegroups.com> <2012Aug23.165054@mips.complang.tuwien.ac.at> <7x8vd5jvoh.fsf@ruckus.brouhaha.com> <2012Aug25.161317@mips.complang.tuwien.ac.at> <7x8vd299q5.fsf@ruckus.brouhaha.com> <503929e3$0$283$14726298@news.sunsite.dk> <7xfw7aipyk.fsf@ruckus.brouhaha.com> Reply-To: Paul_E.Bennett@topmail.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7Bit X-Trace: individual.net vU19DqpdeDX1waw2Tl7jKQJxf5OxLi6FWSEbafm6A+7Vpy22Vhgn57VegZZf4AqHRy Cancel-Lock: sha1:Sy/ifPpw2LZtia1CqB8ty6a6c0k= Mail-Copies-To: Paul_E.Bennett@topmail.co.uk User-Agent: KNode/0.99.01 Xref: csiph.com comp.lang.forth:15189 Elizabeth D. Rather wrote: [%X] >> Anyway, if a type-checked language lets me write a page full of code and >> fix the compile-time errors to usually get working program, while the >> typeless counterpart makes me stop what I'm doing after basically every >> single line to check for problems the type checker would have caught >> automatically, I'd say the type checker has made itself worthwhile. > > Unit-testing every definition pays off handsomely in saved debugging > time by catching all kinds of bugs, not just type errors. > > And my experience is similar to Anton's, in that I make very few type > errors. This may be because I'm accustomed to matching the right > operators to the right data type, whereas folks who are used to > languages that do type inference are less conscious of it. But the > majority of errors (not only for me but for programmers I work with) are > logic/algorithm errors, and they're readily detected by unit testing > each definition. Takes seconds, can save hours! Writing a whole page of code at a time just has the wrong feel to doing the job right. Concentrate on the correctness of one function at a time, review the intent (as expressed in the glossary text you wrote to specify what was to happen) and test each word as you complete it (ensuring it meets the specification of the glossary). On this basis I built the techniques for certification of Forth code to ensure compliance with specification. No real hunting required for the hidden bugs as you should expunge them as you go to ensure they are not introduced in the first place. Of course, you need to really concentrate on getting the specification right first. -- ******************************************************************** Paul E. Bennett............... Forth based HIDECS Consultancy Mob: +44 (0)7811-639972 Tel: +44 (0)1235-510979 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************