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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public From: "Robert Martin" Subject: Re: Software landmines (loops) Date: 1998/09/03 Message-ID: <6snpvb$e6f$1@hirame.wwa.com>#1/1 X-Deja-AN: 387725556 References: <6rf59b$2ud$1@nnrp1.dejanews.com> <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <904556531.666222@miso.it.uq.edu.au> <6sgror$je8$3@news.indigo.ie> <6sh3qn$9p2$1@hirame.wwa.com> <6simjo$jnh$1@hirame.wwa.com> <35eeea9b.2174586@news.erols.com> <6sjj7n$3rr$1@hirame.wwa.com> <35f055a5.1431187@news.erols.com> <6sjnlu$83l$1@hirame.wwa.com> <6skfs7$2s6$1@hirame.wwa.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: WorldWide Access - Midwestern Internet Services - www.wwa.com Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-03T00:00:00+00:00 List-Id: Joe Gwinn wrote in message ... >I would submit that good programmers write clear, simple code, regardless >of the nature of the language or language constructs used. (With the >possible exception of APL, which was known as the write-only language.) I >have seen the same effect in the design of digital hardware. The key >issue is clarity of thought; lost-puppy engineers will do the oddest >things, at length. It can be painful to watch, and hard on the engineer. Hardware engineers have their own intresting set of principles that they need to adhere to. Woe to the hardware engineer who does not use bypass capacitors. Woe to the hardware engineer who runs HF digital lines next to analog feedback lines. etc, etc.. In other words, there are things that the experienced hardware engineer knows that "you just don't do". >So, the whole 1970s debate about structured programming (and thus GOTOs) >reduced to the fond hope that if we tied the hands of those lost-puppy >programmers, they would no longer be lost, and would then think ahead and >write good code. Negative. That is not the point, nor ever was the point. The point of structured programming was not the elimination of GOTO. Indeed, you can write perfectly structured programs with GOTO. The point of structured programming was to recusively form the structure of an algorithm using units that have a single-entry and a single exit. And this structure has some concrete and well understood benefits. Even now, any programming standard that forces engineers to follow this scheme is probably broken. It is more important the engineer understand the costs and benefits of structured programming; then force them to blindly follow it. It was not Dijkstra's hope that we could tie the hands of the young puppies and thereby make good engineers out of them. Rather, I think it was his hope that experienced engineers would understand his suggestions and find that they had value in at least some contexts. Robert C. Martin | Design Consulting | Training courses offered: Object Mentor | rmartin@oma.com | Object Oriented Design 14619 N Somerset Cr | Tel: (800) 338-6716 | C++ Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com "One of the great commandments of science is: 'Mistrust arguments from authority.'" -- Carl Sagan