Monday, August 02, 2004

PLSQL: The Beauty Is in the Details

Tech PLSQL: The Beauty Is in the Details:

"TECHNOLOGY: PL/SQL The Beauty Is in the Details
By Steven Feuerstein
Pay attention to the details in conditions, loops, and declarations, and create better code.
Some of my past articles in Oracle Magazine have offered a variety of 'big picture' best practices to help you write code properly. This article takes a different approach. It invites you to pay attention to seemingly minor details in the way you write IF statements, loops, and declarations.
I have found it best to think of a program as a kind of fractal construct, at least when it comes to code quality. A definition of fractal is 'a geometric pattern that is repeated at ever smaller scales...' according to www.dictionary.com.
An application has an overall shape: its architecture, database design, and major subsystems. Every program within an application has an overall shape: its main algorithm, the high-level requirements it is supposed to meet, and so on. And when you open up that program, you find smaller shapes: the declaration section, the executable section, and so on. And then within those sections, you can find even smaller shapes: IF statements, loops, and assignments.
If you want to write high-quality software, you need to pay attention to the quality of every level or shape within your applications. And if the lowest-level constructs are written poorly and are hard to understand, that deficiency propagates itself to the highest levels and shapes of logic in a system. "

No comments: