The Semi-Colon Error

Our summer interns started recently and I've had the opportunity to work with a few of them. One day we were helping a coworker implement a story. We were coding, building, and testing in short cycles as we went. One time a build failed. After a few minutes of looking, we found that we'd omitted a semi-colon. We fixed it quickly and got back to work.

This experience and a few others like it caused one of the interns to ask what's the longest that I've spent on a simple error like that. Without thinking too much I'd responded that I've spent a few hours at least once on something so simple. While that seems quite ridiculous, especially to a new-comer, it's not out of the ordinary.

Over the years I've come to prefer simple, stupid mistakes like this. While they can be frustrating to find, they're easy to understand and fix. You find it, you fix it, and you're on your way. Simple. Easy. Quick. This is much preferred to some of the other problems you can fix as a software engineer.

The problems I don't like to encounter are problems with architecture, design, or dirty code. Admittedly these can sometimes be fun to fix, but they're much, much more difficult especially in a system that's been around for a number of years. These problems require a lot of digging, both in the code and with product owners and product managers. When you have a problem like this, not only do you have to find the problem, you have to understand why things are the way they are and derive a solution that both addresses the issue and meets existing needs.

Instead of finding an issue, almost mindlessly typing one character, and continuing on, you now have to find the issue, understand how everything works well enough to describe the issue, talk with a product owner and find out what the code is supposed to be doing, derive a solution, ensure that solution meets all the requirements and fixes the issue, then implement and test it. All-in-all, errors that are more complex than a missing or misplaced character cost a lot more and are a lot more involved.

So, if you're going to put errors and mistakes in your code, try to make them simple and easy. Take the necessary time up front and as you go to make your design right and the errors and bugs you see will be a lot easier and less costly to fix.

Comments