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 8 other subscribers

  • Adim Ofunne

    I agree with with what your saying. NOTHING i hate more than errors that dont produce and error message, as in please show me “error:jojojoij09808080” at least i can google that, I know stack overflow will not let me down, but what am I to do with silence?

    But this boils down to a bigger issue (error management), the reason many things fail silently is for security. A lot of apps catch these errors and swallow some of the more benign ones that may be caused due by mistake because if every error is exposed it allows an attacker to know the effect of every action he/she is taking on the system and allows them to tweak accordingly.

    I think it is a complex problem. I agree with you but I also know why it needs to be so, dont look at me for answers, im just tryna get my own app deployed too 🙂

    • Why not show errors by default but give you the ability to turn them off in production?

      • Adim Ofunne

        That makes sense! Rails does that now that you mention it and you actually only get silent failures if it is 3rd party front end stuff. Front end is usually guilty for that kind of misbehavior from my experience. LOL

  • Pingback: CJS-Task 0.0.8 Release - designbymobius()

  • Pingback: CJS-Task 0.0.8 Release | DrFoxyCleo()