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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL coding style

RE: PL/SQL coding style

From: Koivu, Lisa <lkoivu_at_qode.com>
Date: Thu, 18 Jan 2001 13:12:11 -0500
Message-Id: <10745.127034@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0817A.30E919F0
Content-Type: text/plain;

        charset="iso-8859-1"

No, Chandini, you can do what I did.

I wrote a large data load package and made an example of it in style, readability, reusability and performance. Show them how and they may follow.

How's THAT for an answer.
Lisa

-----Original Message-----
From: Chandini Paterson [mailto:chandini.paterson_at_morse.com] Sent: Thursday, January 18, 2001 12:22 PM To: Multiple recipients of list ORACLE-L Subject: RE: PL/SQL coding style

He's been with the company longer than me obviously and because he was the only person who could allegedly program (before I entered the picture), he is considered something short of a genius!!! No matter what I tell the guy, he just refuses to see sense. Oh well, maybe I should do as you say and hit him on the head ;-)

-----Original Message-----
Brian_McQuillan_at_gelco.com
Sent: 18 January 2001 16:51
To: Multiple recipients of list ORACLE-L

Chandini,
The use of the goto's alone justifies hitting him over the head repeatedly with
some nice book like Oracle 8i PL/SQL programming goto is bad news in any language (never mind c) as it leads to very unstructured
programming and bad things tend to happen.

my $0.02 worth
so.... that being the case why is he the Senior Developer ?

Brian.

"Chandini Paterson" <chandini.paterson_at_morse.com> on 01/18/2001 11:01:57 AM

Please respond to ORACLE-L_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Brian McQuillan/GELCO)

Hi gurus,
  I've just changed jobs quite recently and am already having problems with my Senior Developer (yippee)
  It concerns the PL/SQL coding style. The guy insists that I use 'SELECT ..INTO ' in my code rather than explicit cursors, even though I tried telling him it is more efficient with the latter. He apparently finds it more 'readable' with the 'SELECT.. INTO ' and says that the double fetch
(for each row) is 'no big deal'.

  Also, he insists of using a lot of GOTOs in his code and expects me to do the same. I am adamant that we use EXCEPTION handlers to achieve the same thing (BAsically he checks for error conditions in his code and then does a 'goto error_handler' to handle the error!!!). I prefer using EXCEPTIONS to handle all my error conditions.
  I was just wondering if my concepts are all wrong at this time. I am just curious to know if any of you find his way of coding style preferable to mine. (OH, by the way, he was initially a 'C' progrmmer). Any inputs will be greatly appreciated.

Thanks
Chandini

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Chandini Paterson
  INET: chandini.paterson_at_morse.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Brian_McQuillan_at_gelco.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Chandini Paterson INET: chandini.paterson_at_morse.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01C0817A.30E919F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12"> <TITLE>RE: PL/SQL coding style</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>No, Chandini, you can do what I did. </FONT> </P> <P><FONT SIZE=3D2>I wrote a large data load package and made an example = of it in style, readability, reusability and performance.&nbsp; Show = them how and they may follow.&nbsp; </FONT></P> <P><FONT SIZE=3D2>How's THAT for an answer.</FONT> <BR><FONT SIZE=3D2>Lisa</FONT> </P> <BR> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: Chandini Paterson [<A = HREF=3D"mailto:chandini.paterson_at_morse.com">mailto:chandini.paterson_at_mor= se.com</A>]</FONT> <BR><FONT SIZE=3D2>Sent: Thursday, January 18, 2001 12:22 PM</FONT> <BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT SIZE=3D2>Subject: RE: PL/SQL coding style</FONT> </P> <BR> <P><FONT SIZE=3D2>He's been with the company longer than me obviously = and because he was the</FONT> <BR><FONT SIZE=3D2>only person who could allegedly program (before I = entered the picture), he</FONT> <BR><FONT SIZE=3D2>is considered something short of a genius!!!&nbsp; = No matter what I tell the guy,</FONT> <BR><FONT SIZE=3D2>he just refuses to see sense. Oh well, maybe I = should do as you say and hit</FONT> <BR><FONT SIZE=3D2>him on the head ;-)</FONT> </P> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>Brian_McQuillan_at_gelco.com</FONT> <BR><FONT SIZE=3D2>Sent: 18 January 2001 16:51</FONT> <BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT> </P> <BR> <P><FONT SIZE=3D2>Chandini,</FONT> <BR><FONT SIZE=3D2>The use of the goto's alone justifies hitting him = over the head repeatedly</FONT> <BR><FONT SIZE=3D2>with</FONT> <BR><FONT SIZE=3D2>some nice book like Oracle 8i PL/SQL = programming</FONT> <BR><FONT SIZE=3D2>goto is bad news in any language (never mind c) as = it leads to very</FONT> <BR><FONT SIZE=3D2>unstructured</FONT> <BR><FONT SIZE=3D2>programming and bad things tend to happen.</FONT> </P> <P><FONT SIZE=3D2>my $0.02 worth</FONT> <BR><FONT SIZE=3D2>so.... that being the case why is he the Senior = Developer ?</FONT> </P> <P><FONT SIZE=3D2>Brian.</FONT> </P> <BR> <BR> <BR> <BR> <P><FONT SIZE=3D2>&quot;Chandini Paterson&quot; = &lt;chandini.paterson_at_morse.com&gt; on 01/18/2001 11:01:57 AM</FONT> </P> <P><FONT SIZE=3D2>Please respond to ORACLE-L_at_fatcity.com</FONT> </P> <P><FONT SIZE=3D2>To:&nbsp;&nbsp; Multiple recipients of list ORACLE-L = &lt;ORACLE-L_at_fatcity.com&gt;</FONT> <BR><FONT SIZE=3D2>cc:&nbsp;&nbsp;&nbsp; (bcc: Brian = McQuillan/GELCO)</FONT> </P> <BR> <BR> <BR> <P><FONT SIZE=3D2>Hi gurus,</FONT> <BR><FONT SIZE=3D2>&nbsp; I've just changed jobs quite recently and am = already having problems with</FONT> <BR><FONT SIZE=3D2>my Senior Developer (yippee)</FONT> <BR><FONT SIZE=3D2>&nbsp; It concerns the PL/SQL coding style.&nbsp; = The guy insists that I use 'SELECT</FONT> <BR><FONT SIZE=3D2>..INTO ' in my code rather than explicit cursors, = even though I tried</FONT> <BR><FONT SIZE=3D2>telling him it is more efficient with the latter. He = apparently finds it</FONT> <BR><FONT SIZE=3D2>more 'readable' with the 'SELECT.. INTO ' and says = that the double fetch</FONT> <BR><FONT SIZE=3D2>(for each row) is 'no big deal'.</FONT> <BR><FONT SIZE=3D2>&nbsp; Also, he insists of using a lot of GOTOs in = his code and expects me to do</FONT> <BR><FONT SIZE=3D2>the same.&nbsp; I am adamant that we use EXCEPTION = handlers to achieve the same</FONT> <BR><FONT SIZE=3D2>thing (BAsically he checks for error conditions in = his code and then does a</FONT> <BR><FONT SIZE=3D2>'goto error_handler' to handle the error!!!). I = prefer using EXCEPTIONS to</FONT> <BR><FONT SIZE=3D2>handle all my error conditions.</FONT> <BR><FONT SIZE=3D2>&nbsp; I was just wondering if my concepts are all = wrong at this time.&nbsp; I am just</FONT> <BR><FONT SIZE=3D2>curious to know if any of you find his way of coding = style preferable to</FONT> <BR><FONT SIZE=3D2>mine. (OH, by the way, he was initially a 'C' = progrmmer).&nbsp; Any inputs will</FONT> <BR><FONT SIZE=3D2>be greatly appreciated.</FONT> </P> <P><FONT SIZE=3D2>Thanks</FONT> <BR><FONT SIZE=3D2>Chandini</FONT> </P> <P><FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" = TARGET=3D"_blank">http://www.orafaq.com</A></FONT> <BR><FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Author: Chandini Paterson</FONT> <BR><FONT SIZE=3D2>&nbsp; INET: chandini.paterson_at_morse.com</FONT> </P> <P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, = California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT> <BR><FONT = SIZE=3D2>---------------------------------------------------------------= -----</FONT> <BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT> <BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT> <BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT> <BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = from).&nbsp; You may</FONT> <BR><FONT SIZE=3D2>also send the HELP command for other information =
(like subscribing).</FONT>
</P> <BR> <BR> <BR> <BR> <BR> <P><FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" = TARGET=3D"_blank">http://www.orafaq.com</A></FONT> <BR><FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Author:</FONT> <BR><FONT SIZE=3D2>&nbsp; INET: Brian_McQuillan_at_gelco.com</FONT> </P> <P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, = California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT> <BR><FONT = SIZE=3D2>---------------------------------------------------------------= -----</FONT> <BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT> <BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT> <BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT> <BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = from).&nbsp; You may</FONT> <BR><FONT SIZE=3D2>also send the HELP command for other information =
(like subscribing).</FONT>
</P> <P><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" = TARGET=3D"_blank">http://www.orafaq.com</A></FONT> <BR><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>Author: Chandini Paterson</FONT> <BR><FONT SIZE=3D2>&nbsp; INET: chandini.paterson_at_morse.com</FONT> </P> <P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, = California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT> <BR><FONT = SIZE=3D2>---------------------------------------------------------------= -----</FONT> <BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT> <BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT> <BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
Received on Thu Jan 18 2001 - 12:12:11 CST

Original text of this message

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