RULES FOR SOFTWARE DEVELOPERS
-
mount: wrong fs type, bad option, bad superblock on //fileserver/foo, missing codepage or other error
- Never tell name or location of the file you couldn't open, or what access rights you're expecting
- Make sure an error message does not mention a possible cause or solution
- Ideally produce no error message at all
- When installing or updating a file, do not tell name or location, "installed" or "updated" is enough info
- Never check if called variables are actually set
- Never validate input; you can always trust a user to pass the correct option, feel free to explode if user passes unexpected parameters.
- Do not document
- Make sure "progname -h" crashes or at least prints "ERROR"
- Having a design is against the law
- If you output an error message, make sure to use a text that will produce at least 1.000.000 google hits
- Do not check preconditions, just lemming of the cliff and throw a useless error or dump a core
- Never use or check return values, that makes it too easy to determine where something went wrong
- Use bugzilla or broken mailinglist managers to effectively discourage users from reporting issues
- There shall be only one error value, and that value shall be -1.
- Magic numbers give your code amazing powers
- Always blame the user, he should have known better
- Never check for an error condition you don't know how to handle
Some fine examples
- bayes: cannot open bayes databases /var/spool/MIMEDefang/.spamassassin/bayes_* R/W: lock failed: File exists
- [crit] (2)No such file or directory: mod_rewrite: could not init rewrite log lock in child
- Note: Cannot set tx queue length on : No such device (errno=19)
- ShellExecuteEx failed: Success
- The following packages have unmet dependencies: linux-image-2.6-686: Depends:
linux-image-2.6.18-4-686 but it is not going to be installed
- # UNCOMMENT THIS LINE OUT.
- scp: No match.
- ldapmodify: GSSAPI Error: Miscellaneous failure (see text) (open(/tmp/krb5cc_0): No such file or directory)
- db_recover: PANIC: No such file or directory
- ber_get_next on fd 13 failed errno=0 (Undefined error: 0)
- convert: no decode delegate for this image format `19092008102.jpg'.
- ntpd[2600]: sendto: Invalid argument
- LWP failed with code[400] message[FTP return code 000]
- Error: Catastrophic Failure
- LDAP_UNDEFINED_TYPE ARRAY(0x8691c80): AttributeDescription contains inappropriate characters
- config: failed to parse line, skipping, in "(no file)": use_dcc 1
- radeon.o kernel module version is 8.59.2 but version 1.17.0 or newer is needed.
- PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
- CODE:17 ERROR:userCertificate: requires ;binary transfer
- calendar_ical::exportVCal() unknown TZID='US/Eastern', defaulting to user timezone 'US/Eastern'!
- sda:<0>Uhhuh. NMI received for unknown reason 80 on CPU 0.
- Cannot stat /backups: Success
- PHP Warning: Unknown: Unable to include '' - request execution failed in Unknown on line 0
- [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
- Could not access KVM kernel module: No such file or directory
Note to the google victims hoping to find answers here: you will find thousands more having the same problems with bad software.