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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Heisenberg Uncertainty Principle Aside,..

Re: Heisenberg Uncertainty Principle Aside,..

From: Mungo Henning <mungoh_at_itacs.strath.ac.uk>
Date: Thu, 18 Feb 1999 13:55:44 +0000
Message-ID: <36CC1BE0.C3B051F7@itacs.strath.ac.uk>


cathexis_at_erols.com wrote:
>
>
> Also, please excuse my obscure var. names, it's not a comm'l app. just fun.
>

Your brevity is understood, but I still feel it is worthwhile to reinforce the meaning of variables by giving them sensible names. Often I have heard programmers complain that their code doesn't work, and often the code contains plenty of obscure names. As an aide to debugging, I get the frustrated programmer to explain what each variable used is for, and I usually insist that they change all obscure names to more meaningful ones - it's amazing how this can self-document code such that the mistakes become visible!

And don't shy away from the "Oh, I can't immediately think of a good name for this variable so I'll just use 'x' " philosophy. If anything ought to ring alarm bells then this should!

Others have replied with regard to the PL/SQL, but I thought that a gentle reminder on sensible naming might not go amiss.

Mungo Henning

P.S. Here's another challenge: write some PL/SQL to take 5 numbers and a target number and combine the 5 numbers to reach the target. For example:

		five numbers are 5 9 15 8 25
		target is 389

		Solution: 25 * 15 + 5 + 9

[for the UK readers, this is the arithmetic challenge on the gameshow "Countdown" on channel4] Received on Thu Feb 18 1999 - 07:55:44 CST

Original text of this message

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