Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Peter Chen and Charles Bachman

Re: Peter Chen and Charles Bachman

From: Brian Inglis <Brian.Inglis_at_SystematicSw.Invalid>
Date: Mon, 07 Jun 2004 08:41:19 GMT
Message-ID: <4o88c0hp7k6fvhfqrvnbt35eqmtj7998to@4ax.com>


On Tue, 25 May 2004 19:01:45 -0700 in comp.databases.theory, Gene Wirchenko <genew_at_mail.ocis.net> wrote:

>Leandro Guimaraens Faria Corsetti Dutra <leandro_at_dutra.fastmail.fm>
>wrote:
>
>>Em Thu, 20 May 2004 16:00:37 -0700, Gene Wirchenko escreveu:
>>
>>> Leandro Guimaraens Faria Corsetti Dutra <leandro_at_dutra.fastmail.fm>
>>> wrote:
>>>
>>>>Em Wed, 19 May 2004 23:22:34 -0700, Gene Wirchenko escreveu:
>>>>
>>>>> I see no advantage to
>>>>> being stuck with having to do something one way only.
>>>>
>>>> Have you ever grokked _GOTO considered harmful_, or Codd's
>>>>rules?
>>>
>>> The former most definitely; the latter, not yet. There are times
>>> when a well-placed goto will aid program clarity.
>>
>> Only if the language is poor.
>
> You are too doctrinaire for me.
>
> One of the fast sorts has a structure whose symmetry wrt to two
>variables is obvious with a couple of gotos, but which is lost with
>structured code.

Are you perhaps referring to the quicksort partitioning step? If solution symmetry is lost in "structured" code, blame the programmer's poorly structured thinking, and not the poorly structured code.

Some intuitively grok structure, some find structure in the spaghetti, and many have structure thrust upon them.

Most CS students are probably in the latter camp; they've been told: don't use GOTO, it's bad, which is a useful first order approximate model.

Students probably haven't read Bohm and Jacopini, or Dijkstra, Dahl, and Hoare, to find out why the GOTO should be unnecessary for writing portable code in a well designed and implemented language; how well structured designs can lead to better implementations; and why it's okay to break the rules when language design or implementation fall short of the ideal.

Exercises in restructuring (aka refactoring) real life examples of spaghetti code (and data) should be mandatory to teach students why well structured code is better than poorly "structured" code or unstructured spaghetti code.

You can learn a lot about structure by studying code with GOTOs and poorly "structured" code to find where the implementation breaks the structure of the solution, and how to structure a better design and/or implementation.

-- 
Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian.Inglis_at_CSi.com 	(Brian dot Inglis at SystematicSw dot ab dot ca)
    fake address		use address above to reply
Received on Mon Jun 07 2004 - 03:41:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US