The healthcare.gov website wasn’t broken because the government’s programmers are incompetent. It was broken because the government failed to test it enough before releasing it.

A basic rule of programming is that all software will have major bugs. This is as true of the best programmer in the world as it is of the worst programmer. However, all programmers tend to this mistake: only testing completed projects.

During the testing period, testers deliberately try to break the program so they can expose bugs. They use the program in ways it’s not meant to be used, mistype commands, and mess with it. Testers report the bugs back to the programmers so that the problems can be fixed. The software is not released to the public until the product managers, testers, and developers are satisfied.

Software testing should be done continuously, not just at the end. It saves time and money: the fresher the code is in the programmer’s mind, the easier it is to fix.

Unfortunately, neither the government or the contractors built this into the project planning. According to the contractors who completed the work, no end-to-end testing occurred until two weeks before the website was due to launch. This does not leave enough time to fix bugs.

We’re seeing the results of putting testing only at the very end of the project. Critics of Obamacare pointed to the bugs as proof that the political program is a failure, while the White House scrambles to fix the errors resulting from faulty project management. Lawmakers blame contractors for not testing enough, while contractors claim that lawmakers didn’t take testing into account. There’s a lot of blame to go around, and it only intensifies the political tension around the healthcare plan. The whole debacle (or at least a lot of the software side of it) could have been avoided by doing proper testing.

Don’t make the same mistake with your applications that the US government made. Do your testing before you release new programs to the public, and do it along the way so you have time to fix the problems you find.