Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL coding style
This is a multi-part message in MIME format.
------=_NextPart_000_0003_01C08167.A22A4E30 Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Thank you.
-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Kent Wayson
Sent: Thursday, January 18, 2001 3:31 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: PL/SQL coding style
Take out the 'n' - it's Feuerstein and he's written Oracle books for O'Reilly, including Oracle PL/SQL Programming, Advanced Oracle PL/SQL Programming with Packages, and Oracle Built-in Packages.
Interview at http://oracle.oreilly.com/news/feuerstein_0300.html and small bio at http://www.oreilly.com/catalog/oraclebip/author.html
Kent
At 02:11 PM 1/18/01 -0800, you wrote:
>>>>
Lisa,
When you say " Give him Feuernstein's book. " what book do you mean? I can't seem to find a book by such an author on my usual search engine. Amazon gives me '1354 total matches for "bernstein" ' when I do a search on 'Feuernstein'
David
-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Koivu, Lisa
Sent: Thursday, January 18, 2001 10:17 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: PL/SQL coding style
Chandini,
GOTOS are ABSOLUTE VOODOO. He thinks that SELECT INTO is more readable, how readable is a GOTO?? It ISN'T. Good style also involves writing code that does not involve UNNECESSARY PROCESSING.
Give him Feuernstein's book. That's correct style in my opinion that is not recreating the wheel and utilizing all that PL/SQL does for you.
I almost liken not using exception handling to not using the classes that are given to you in java.
But seriously, I've been in the same position. Being the dba, all code that is compiled into the database is my responsibility. When I came here, I screamed bloody murder because exceptions weren't being used, the sqlcode was being passed all over the place instead. I insisted on changes to the standards document to enforce use of exceptions plus educated some of the developers on how to use them. The bottom line is, if you support it, then you give the final yay or nay for the code.
Of course, you could be direct and just tell him to pull his head out.
HTH
Lisa
-----Original Message-----
[<mailto:chandini.paterson_at_morse.com>mailto:chandini.paterson_at_morse.com]
Sent: Thursday, January 18, 2001 11:02 AM
To: Multiple recipients of list ORACLE-L
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>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
<<<<
------=_NextPart_000_0003_01C08167.A22A4E30 Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Dus-ascii" =http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR></HEAD> <BODY> <DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =class=3D203175922-18012001>Thank=20
Thursday, January 18, 2001 3:31 PM<BR><B>To:</B> Multiple recipients of =
list=20
ORACLE-L<BR><B>Subject:</B> RE: PL/SQL coding =
style<BR><BR></FONT></DIV>Take out=20
the 'n' - it's Feuerstein and he's written Oracle books for O'Reilly, =
including=20
Oracle PL/SQL Programming, Advanced Oracle PL/SQL Programming with =
Packages, and=20
Oracle Built-in Packages. <BR><BR>Interview at=20
http://oracle.oreilly.com/news/feuerstein_0300.html and small bio at=20
http://www.oreilly.com/catalog/oraclebip/author.html<BR><BR><BR>Kent<BR><=
BR><BR>At=20
02:11 PM 1/18/01 -0800, you wrote: <BR>>>>><BR>
<BLOCKQUOTE><?fontfamily><?param Arial><?color><?param =
0000,0000,ffff>Lisa,<BR><?/color><?/fontfamily><BR><?fontfamily><?param =
Arial><?color><?param 0000,0000,ffff>When=20
you say " Give him Feuernstein's book. " what book do you mean? I =
can't seem=20
to find a book by such an author on my usual search engine. Amazon =
gives me=20
'1354 total matches for "bernstein" ' when I do a search on =
'Feuernstein'<BR><?/color><?/fontfamily><BR><?fontfamily><?param =
Arial><?color><?param =
0000,0000,ffff>David<BR><?/color><?/fontfamily><BR><?fontfamily><?param =
Tahoma>-----Original=20
Message-----<BR><B>From:</B> root_at_fatcity.com =
[mailto:root_at_fatcity.com]<B>On=20
Behalf Of </B>Koivu, Lisa<BR><B>Sent:</B> Thursday, January 18, 2001 =
10:17=20
AM<BR><B>To:</B> Multiple recipients of list =
ORACLE-L<BR><B>Subject:</B> RE:=20
PL/SQL coding style<BR><BR><?/fontfamily><BR>Chandini, <BR><BR>GOTOS =
are=20
ABSOLUTE VOODOO. He thinks that SELECT INTO is more readable, how =
readable is=20
a GOTO?? It ISN'T. Good style also involves writing code that does not =
involve=20
UNNECESSARY PROCESSING. <BR><BR>Give him Feuernstein's book. That's =
correct=20
style in my opinion that is not recreating the wheel and utilizing all =
that=20
PL/SQL does for you. <BR><BR>I almost liken not using exception =
handling to=20
not using the classes that are given to you in java. <BR><BR>But =
seriously,=20
I've been in the same position. Being the dba, all code that is =
compiled into=20
the database is my responsibility. When I came here, I screamed bloody =
murder=20
because exceptions weren't being used, the sqlcode was being passed =
all over=20
the place instead. I insisted on changes to the standards document to =
enforce=20
use of exceptions plus educated some of the developers on how to use =
them. The=20
bottom line is, if you support it, then you give the final yay or nay =
for the=20
code. <BR><BR>Of course, you could be direct and just tell him to pull =
his=20
head out. <BR><BR>HTH <BR>Lisa <BR><BR>-----Original Message-----=20
=
<BR>[<mailto:chandini.paterson_at_morse.com>mailto:chandini.paterson_at_m=
orse.com]=20
<BR>Sent: Thursday, January 18, 2001 11:02 AM <BR>To: Multiple =
recipients of=20
list ORACLE-L <BR><BR><BR><BR>Hi gurus, <BR>I've just changed jobs =
quite=20
recently and am already having problems with <BR>my Senior Developer =
(yippee)=20
<BR>It concerns the PL/SQL coding style. The guy insists that I use =
'SELECT=20
<BR>..INTO ' in my code rather than explicit cursors, even though I =
tried=20
<BR>telling him it is more efficient with the latter. He apparently =
finds it=20
<BR>more 'readable' with the 'SELECT.. INTO ' and says that the double =
fetch=20
<BR>(for each row) is 'no big deal'. <BR>Also, he insists of using a =
lot of=20
GOTOs in his code and expects me to do <BR>the same. I am adamant that =
we use=20
EXCEPTION handlers to achieve the same <BR>thing (BAsically he checks =
for=20
error conditions in his code and then does a <BR>'goto error_handler' =
to=20
handle the error!!!). I prefer using EXCEPTIONS to <BR>handle all my =
error=20
conditions. <BR>I was just wondering if my concepts are all wrong at =
this=20
time. I am just <BR>curious to know if any of you find his way of =
coding style=20
preferable to <BR>mine. (OH, by the way, he was initially a 'C' =
progrmmer).=20
Any inputs will <BR>be greatly appreciated. <BR><BR>Thanks =
<BR>Chandini=20
<BR><BR>-- <BR>Please see the official ORACLE-L FAQ:=20
<http://www.orafaq.com>http://www.orafaq.com <BR>-- <BR>Author: =
Chandini=20
Paterson <BR>INET: chandini.paterson_at_morse.com <BR><BR>Fat City =
Network=20
Services -- (858) 538-5051 FAX: (858) 538-5051 <BR>San Diego, =
California --=20
Public Internet access / Mailing Lists=20
=
<BR>-------------------------------------------------------------------- =
<BR>To REMOVE yourself from this mailing list, send an E-Mail message =
<BR>to:=20
ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in =
<BR>the=20
message BODY, include a line containing: UNSUB ORACLE-L <BR>(or the =
name of=20
mailing list you want to be removed from). You may <BR>also send the =
HELP=20
command for other information (like subscribing).=20
<BR><BR></BLOCKQUOTE><<<<<BR><BR><BR>-- Please see the =
official=20
ORACLE-L FAQ: http://www.orafaq.com -- Author: Kent Wayson INET:=20
waysonkw_at_mail.milwaukee.k12.wi.us<BR>Fat City Network Services -- (858) =
538-5051=20
FAX: (858) 538-5051 San Diego, California -- Public Internet access / =
Mailing=20
Lists =
-------------------------------------------------------------------- To=20REMOVE yourself from this mailing list, send an E-Mail message to:=20 ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the = Received on Thu Jan 18 2001 - 16:59:26 CST
![]() |
![]() |