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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92c39a3be0a7f17d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-14 08:19:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!news-x2.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Future with Ada Date: Wed, 13 Mar 2002 12:55:47 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3C7FB9D2.D9C6E055@boeing.com> <3C81DF1F.9000503@mail.com> <3C83A112.6080302@mail.com> <3C84223C.A356F466@adaworks.com> <3C853A04.34826F39@despammed.com> <3C8D0D70.BB09F3DA@despammed.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1016042151 25708 136.170.200.133 (13 Mar 2002 17:55:51 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 13 Mar 2002 17:55:51 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:21236 Date: 2002-03-13T17:55:51+00:00 List-Id: I don't know about that. Back when I was in college they kept telling us we should write subprograms that high functional independence and low coupling. Arbitrarily dividing up a routine just to get it into some line limit was considered one of the better ways of intercoursing that up. :-) But then they seem to have quit teaching that "Y = M*X + B" in favor of "Y = A + B*X" or some such, so maybe functional independence and coupling have fallen out of favor too. :-) MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Kevin Cline" wrote in message news:dcfe911f.0203130716.50981806@posting.google.com... > > Well, that would be better, although even 100 lines is rather long. > Why? Because understanding or testing a 400-line subroutine is > considerably > more than four times as difficult as understanding or testing four > 100-line subroutines. > > Presumably you don't have 400 uncommented lines, > so your 400-line subroutine is going to be sprinkled with > comments like > > -- do something > ... code to do something ... > -- do something else > ... code to do something else ... > -- do another thing > ... > > Extract each block of code to a separate function > named by the comment preceding the block: > > do_something() > do_something_else() > do_another_thing() > > If the argument lists to the subroutines are long, > then consider introducing a new type to hold the > data passed between the subroutines.