HP3000-L Archives

March 2004, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tracy Pierce <[log in to unmask]>
Reply To:
Tracy Pierce <[log in to unmask]>
Date:
Fri, 12 Mar 2004 10:21:20 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (63 lines)
That sounds pretty bad out front, but how many total lines in your 711
programs?  (and do they all produce 711 errors too?;-)  I have no idea where
you're headed with your systems, but The benefits of spaghetti removal are
huge, and you can't make spaghetti code without goto.

I've usually found that goto elimination produces excellent side effects,
one of which is that your total lines of code will subtantially decrease.
Another is that those really icky horribly difficult routines, surely buggy,
suddenly start working quite nicely, and the pain of reading them turns to
pleasure if not becomes unnecessary.

With the ability to compile your entire system with a single command at
hand, you could probably get rid of 1/4 of your code and all of your gotos
inside of a man month.  If your system has any future at all, it's worth
doing, as you'll save the next man month within 6 months, as well as
meanwhile developing a grand taste for ravioli.

Tracy Pierce


> -----Original Message-----
> From: Emerson, Tom [mailto:[log in to unmask]]
> Sent: Friday, March 12, 2004 9:33 AM
> To: [log in to unmask]
> Subject: Re: GO TO -- scary statistics...
>
>
> > -----Original Message-----
> > From: Tracy Pierce [mailto:[log in to unmask]]
> >=20
> > Got a weird bug in a COBOL program?  1st item: look for GO=20
> > TO, a very sure signpost of crummy if not quite ancient code.
>
> %print @.livesrce;search=3Dcl"go to";out=3D$null;page=3D0
> [...]
> %showvar @print@
> MPEXPRINTLINESFOUND =3D 15181
>
> %showvar @num@
> MPEXNUMSUCCEEDED =3D 711
> MPEXNUMFAILED =3D 0
>
> %calc 15181//711
>  21.351618
>
> so we're AVERAGING 21 GO TO's per program :(
>
> %listf @.livesrce(not fcontains("GO TO")),6
> [...]
> %SHOWVAR @NUMS@
> MPEXNUMSUCCEEDED =3D 59
>
> and the ratio of programs-with-goto vs. programs-without is
> about 12:1 =
> -- double :(
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2