Why I Don’t Write Bug Free Code

Gentlemen, we will chase perfection, and we will chase it relentlessly, knowing all the while we can never attain it. But along the way, we shall catch excellence. – Vince Lombardi

Confession: I’m not a wizard. Bug-free code doesn’t just magically emanate from my keyboard. Yes, I know that would be nice, and I know you’d prefer it. You may even think that if I were a good programmer, bugs would never happen, but the truth is…

…you can’t afford bug free code.

I’ve worked on Air Traffic Control and Navigation Systems. I know what it takes to go from 99% correct to five-nines-five (99.9995%) level of assurance.

We’re talking about such efforts as independent validation of the specification, pair-programming, source code walkthroughs, 99% code coverage by automated unit tests, more time in the test labs then under development. (Yes, labs: there’s multiple test teams with different testing objectives)

Can your stressed software budget afford matching the development team with equal number of testers? Can your pressed schedule support the lowering of your team’s velocity as you introduce these additional processes?

…you can’t communicate your vision precisely enough.

You do your best to explain what you want — user stories, clear mock-ups, prototypes, even videos explaining app behavior — but there are still gaps that the developer needs to fill. They don’t have the exact vision, and they’re tasked with having to take their interpretation of your vision and make it a concrete thing. You might not even know the precise behavior you’re after until after you’ve worked with the app.

Is your specification “bug-free?”

…because you probably don’t actually need bug-free code.

You need running software that works well. It may not be perfect, but a good app doesn’t necessarily need to be error-free. Bug isn’t synonymous with virus. You can launch a successful app with bugs. I would assert that all the apps you use on a regular basis have bugs. Death and destruction aren’t imminent if there’s a few undiscovered bugs.

 Facebook for iOS crashes on me once a week. It seems to be reasonably successful. Will users still use your app if there are bugs?

What To Do

  1. Be as clear as you can afford on specifying the behavior of the app before coding starts. Familiarize the developers with the context of the app, spend effort making clear mockups, do hallway user-testing of your designs, video your paper prototypes in action. Communicate your vision of what the app should be doing.
  2. Have an issue tracking system. Track the story implementation and bug fixes, from discovery through development, then test.
  3. Brutally triage the issues and bugs. Make sure you’re fixing the bugs and implementing the features that are impacting your user’s experience. Those items that are costing you support dollars and causing users to leave the app should get top priority. Your tracking system needs to reflect these priorities.
  4. Apply a testing process consistently. This can be as simple as a release checklist (just like the airline pilots use). An independent person needs to verify that each step has been taken.
  5. Stuff happens. Even major airlines IT systems crash, canceling all flights for many hours. Have an emergency action plan. What happens when a critical failure gets exposed? Who’s called, has the authority to call out the troops and get things fixed ASAP?

An app developer can’t promise you perfection but can work with your budget to help you make a functional app, giving you confidence that your app is meeting your objectives.


Leave a reply

Your email address will not be published. Required fields are marked *



We're not around right now. But you can send us an email and we'll get back to you, asap.


©GaltSoft, LLC.

Log in with your credentials

Forgot your details?