I guess PHP is kinda like the Model T of programming. Made it easy and accessible to the masses.
Quote:
Originally Posted by raymor
What if that list you're working on happens to be empty? Sloppy, far from elegant code will probably break on an empty list. (Ex. code to modify a password file that happens to be empty because it's a new site, or code to find the middle of a file that happens to be empty.)
|
If it's going to be a product then yeah you should have all that kind of checking, otherwise what is the point of checking if say a MySQL database of referrers is empty when the only time it was and ever will be empty was when it was first created?