Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re (tilly) 1: Module Pondering

by tilly (Archbishop)
on Jan 19, 2002 at 10:46 UTC ( [id://140053]=note: print w/replies, xml ) Need Help??


in reply to Module Pondering

I have a different and (to my mind) far more important reason for not selecting *.

The problem is that you want to make errors obvious as early and as explicitly as possible. If the programmer has been explicit about what columns are expected there, then in the future if you rebuild the database, migrate the script, etc you will find out early about any bad assumptions about what columns are present. By contrast if you select *, things may look like they work for a good bit, but expected data is not present (because the columns were changed out from under you). This will likely take longer to debug simply because if (not when) you get an error message, it will not be obviously tied to where the actual broken assumption is.

So be explicit up front and some day it will save you a headache.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://140053]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found