No Clean Feed - Stop Internet Censorship in Australia

Silent failure is evil

Here's a gotcha: SQLite3 doesn't do referential integrity. That'll be a problem if you're relying on the RedHillOnRails plugin to enforce referential integrity on the database.

[Segue: if you're writing a green-fields application that doesn't have to deal with a legacy database with known referential integrity problems, there is no excuse not to enforce referential integrity in the database. Even if you're using Rails, which has no support out-of-the-box for referential integrity in the database, it's easy enough to install and use the aforementioned RedHillOnRails plugin.]

It's quite reasonable for the SQLite3 team to not handle referential integrity out of the box. After all, SQLite3 is designed to be tiny. To meet this requirement requires a lean feature set.

What is a right pain in the ass is the fact that SQLite3 silently fails when a consumer requests referential integrity. If my database creation script runs without errors, I pretty much expect that it worked. I don't expect that the database noticed failures, but didn't think those were sufficiently important to mention. Especially when the failure in question relates to something as important as referential integrity!

In my opinion (although others disagree) failure should be noisy, and success should be silent.

Good point

So you're saying that 'noisy' should really be 'conspicuous', yes?

Linked 'Silent Failure Noisy Success' article

The linked article seems to have a problem I have seen before - everybody is saying the same thing, but seeing it from different angles.

What it boils down to is that failure should stand out by:

  • being LOUD in a silent environment;
  • OR BY stopping THE NOISE IN A LOUD ENVIRONMENT.