Information Technology Dark Side

Struggles of a Self-Taught Coder

Information Technology Dark Side header image 2

I learned a new testing oracle today from a DBA!

October 1st, 2009 · 2 Comments

Well, he’s really more of an all-around data super genius, but anyway I learned something cool from him:

The Principle of Least Surprise

In other words, if the software could behave in multiple perfectly legitimate ways (based on all the other stuff in the context of the application), then you should go with the one that is going to surprise the user the least.

I like this as a test oracle and as a tool for advocating bugs. In my environment at least, it’s easier to get iffy bugs fixed if I can provide alternative solutions that are easier to understand (i.e. less surprising to the user).

Anyway, thanks to Josh Tolley for the good idea.

PS – Since someone is bound to point this out, let me just acknowledge right away: as a rubyist I should have already been familiar with this.

PPS. Here’s another reference

PPPS. Don’t apply this principle to java libraries. You’ll poke your eyes out and spend the rest of your days in Arkham Asylum.

If you enjoyed this post, make sure you subscribe to my RSS feed! Stumble it!

Tags: Uncategorized

2 responses so far ↓

  • 1 Mike Kelly // Oct 15, 2009 at 5:17 pm

    No PPPPS? What kind of blog is this!?!

  • 2 Rapidshare SE // Feb 27, 2010 at 6:02 pm

    Thanks for the referense. I also need it badly.

Leave a Comment