Fail Loudly

Have you ever been in a situation where bae is upset with you but is refusing to tell you what’s wrong?

images

“Honey are you ok?”
“Yes”
“You don’t look fine. Is something wrong?”
“No”
“You’re doing that one answer thing again”
“Ok”

That’s exactly what it’s like when you’re working with technology that fails silently.

On the surface everything looks fine, but if you’re paying attention you can tell something’s not quite right. Unfortunately it isn’t giving you any hints about what you’re doing wrong.

Yesterday I was helping a co-worker migrate a site to WordPress.

We’d successfully converted the layout to a WordPress theme and got it working pretty quickly, so we started migrating the hard-coded sections into the content management system.

We used the famous WordPress loop to iterate over the data, set a template to display it and ….

Nothing.

No content. No error message. Nothing.

We struggled for two hours, trying different loop variants and methods for changing the query, but to no avail. We systemically disabled scripts and eliminated imported stylesheets that seemed remotely relevant. No dice.

In his frustration, he suggested I delete a random line that was responsible for bringing in the featured image.

To my absolute amazement, it worked!

There’s every possibility the error was mine, so I’m not trying to pawn the blame off on WordPress or anyone.

My issue is that WordPress didn’t tell me what I was doing wrong. It rendered everything til the failure, then sent the incomplete template to the browser.

It should have included a message when it hit an error. Even a cryptic message would have helped us narrow down what isn’t wrong, so we can reach what is wrong by process of elimination.

If you’re responsible for building anything, please make failures obvious. Your users will thank you.

Get New Posts via Email

I don't always post, but when I do, you can get it sent directly to your inbox.

Join 16 other subscribers