
Usually when we make a mistake, we want to hide it. We can’t let others see our weakness. It could ruin our reputation! If you want to grow, you’ll have to get over this bad habit.
Mistakes are excellent learning opportunities. Like an archer missing the mark, or a basketball player missing a shot, noticing what went wrong is the fastest way to get consistent at doing it right. Maybe the aim is off, or my head is leaning a bit. Is my weight distributed properly? What’s that thing I need to do to make it right?
One great thing about our leading IDEs is that if you make a mistake, it tells you right away. Misspelled variable name? It gets a squiggly red underline. Forgotten parameter or wrong parameter type? Squiggly red underline. Some will even show a red line in the file list next to the file that no longer compiles.
When we have a good set of unit tests, they will point out mistakes quickly, too. Save a change and the tests can be configured to run automatically. They tell you right away what you broke with your latest change.
Those mistakes are easy to own. It’s those other ones that are hard: the change that broke the build. The bug you didn’t catch. The bug you introduced because of poor testing. The library update that has API changes. The mistaken change to the production database when you thought it was the development one.
What can we learn from experiences like this? First, we can learn a little humility: I don’t know everything. I’m not perfect (and neither is anyone else). Next we can step back and own the problem – and the solution!
Perhaps I need to have an automated process in place where I pull all of the changes and run the tests locally before I check them in – because I forget sometimes, but the computer never does.
If I miss a bug, why? What did I not consider? Was I under pressure to deliver quickly without proper testing? Did I not follow proper TDD practices? Is this a design problem? How can I make it hard for this kind of problem to happen in the future?
When you make an embarrassing mistake, step back and look at it. What caused it? Sloppiness? Lack of attention? Or a bad process that can be automated? Let the machine do the tedious stuff for you and remember things for you. Find a way to automate the solution to your problems. You’re a professional. You can build or buy a tool, or create a system that can automate most of your tedious problems away.
What is a mistake you made this week? What can you do to prevent it from happening again?

