About the Code
The best way to learn how to write good code is by analyzing and following examples. Almost every best practice offered in this book includes a code example, both in the text and in downloadable form from the Oracle PL/SQL Best Practices site, available through the O’Reilly & Associates site at:
| http://www.oreilly.com/catalog/orbestprac |
To locate the code for your best practice, simply enter the best practice identifier, such as BIP-10, in the search field. You will then be directed to the associated code. You can also browse the site by topic area. You can even offer your own insights about PL/SQL best practices, so I encourage you to visit and contribute.
As a rule, I will follow my own best practices in these examples (unless the point of the code is to demonstrate a “bad practice”!). So, for example, you will rarely see me using DBMS_OUTPUT.PUT_LINE, even though this “show me” capability is needed in many programs. As I mention in [BIP-01: Avoid using the DBMS_OUTPUT.PUT_LINE procedure directly.], you should avoid calling this procedure directly; instead, build or use an encapsulation over DBMS_OUTPUT.PUT_LINE. So rather than seeing code like this:
DBMS_OUTPUT.PUT_LINE (l_date_published);
you will instead encounter a call to the “pl” or “put line” procedure:
pl (l_date_published);
I also make many references to PL/Vision packages. PL/Vision is a code library, consisting of more than 60 packages that offer 1,000-plus procedures and functions to perform a myriad of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access