Thursday, 21 January 2010

The LIBUSWKAIQ anti-pattern

Design patterns have been all the rage for quite some time now, and with them have come an increased awareness of patterns that pretend to be design patterns but really are anti-patterns; a pattern that appears obvious but really is far from optimal in practice (read: stupid).

A relatively recent (and greenfield) implementation where I work is built around such an anti-pattern. We've named this lovely piece of instant legacy the LIBUSWKAIQ anti-pattern. It's pronounced "Libbus-wah-cake" and stands for "Let It Blow Up So We Know About It Quickly."

  • This pattern gives you free license to forget about exception handling and encourages applications to fall over and die if any exceptional circumstances arise.
  • This pattern encourages you to throw exceptions with the explicit purpose of killing your app.
  • This pattern hates error handling.
  • This pattern creates needy applications that require immediate attention.
  • This pattern encourages 3am support calls. This pattern wants your support developers to always be deprived of sleep. This patterns wants you to spend your ENTIRE support budget.
  • This pattern appeals to lazy people.

Don't do this! Handle your errors. Keep your apps running. Put errors to the side and let humans deal with it as soon as it is conveniently possible. Don't stop your entire business process running just because it experienced a minor 'blip.'

You're smarter than this. Don't get sucked into becoming a Libbus-wah-caker.