![]() |
|
Welcome to the Monastery | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Excellent feedback so far. The only thing I'd add is to lose the comments. Let the code (ie. the proper naming of variables and function names) do the saying of what is happening. Comments should only be used to describe *why* something is happening. A comment in code should be a rather rare occurrence. If I see a comment in code, it's to point out why the following code is doing something that goes against the norm. For example:
It's readily apparent that execute() and fetchall_arrayref() are performing the "execute command" and "get the data". I know it's instinctive when first writing code to pepper it with comments, but trust me, if you practice without them, you'll become more efficient as a code reader and writer more quickly. It will force you to come up with more descriptive names for various items within your code. Example:
vs:
In reply to Re: Is there a cleaner way to write this code below, which includes derferencing references, that themselves have to be dereferenced?
by stevieb
|
|