24
Aug
When you make a mistake, write a test
I wouldn’t call it a fiasco but a site I made today went out and there was one large bug that I entirely overlooked. There was an invisible <div> absolutely positioned over the main navigation of the site.
As a result I did something that a boss once told me to do when I messed up royally. That is, make a test so that I never do it again.
This is some really poignant advice for me now since It points out two things that I struggle with:
- Making the same mistake twice.
- Testing my assumptions.
I’d like to think that I’m good at the things I do but there are times when I know I fall very short of excellence. I get frustrated with myself; not because I think of myself as perfect but rather, I want to do good work. But none the less, everyone feels this way at times. What’s worse though is making that mistake again knowing that I’ve tried to correct myself. To make sure of that, I write tests for myself, either by writing some code, making a visual reminder, composing a checklist or starting a habit to remind me to never commit my mistake again.
Secondly, I know that I try to think I know things I don’t know. Those are assumptions … and if the logic seems weird to you, it’s because it is. As I see it, assumptions are basically conclusions you’ve jumped to without the facts. And what better way is there to learn facts than to test assumptions. When I do, I will know the things I think I know.
These are two reasons I forced myself tonight to write a checklist of all the things that might go wrong with a webpage. I’ll add to my list as I make mistakes and I encourage you to write a test or make a reminder every time you make a mistake as well.