Skip to content

Rules for Software developers…

April 19, 2009 8:54 am
  1. Never tell name or location of the file you couldn’t open, or what access rights you’re expecting
  2. Make sure an error message does not mention a possible cause or solution
  3. Ideally produce no error message at all
  4. When installing or updating a file, do not tell name or location, “installed” or “updated” is enough info
  5. Never check if called variables are actually set
  6. Never validate input; you can always trust a user to pass the correct option, feel free to explode if user passes unexpected parameters.
  7. Do not document
  8. Make sure “progname -h” crashes or at least prints “ERROR”
  9. Having a design is against the law
  10. If you output an error, make sure to use a text that will produce at least 1000000 google hits
  11. Do not check preconditions, just lemming of the cliff and throw a useless error or dump a core
  12. Never use or check return values, that makes it too easy to determine where something went wrong
  13. Use bugzilla or broken mailinglist managers to effectively discourage users from reporting issues
  14. There shall be only one error value, and that value shall be -1.
  15. Magic numbers give your code amazing powers
  16. Always blame the user, he should have known better
  17. Never check for an error condition you don’t know how to handle

🙂

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: