KillerPHP Blog

PHP Programming: 1 part code, 2 parts testing.

November 14, 2010

Any programmer with more than 3.2 days of experience knows that programming has a lot more to do with testing than coding.

Most errors in software are human related – typos, failed attempts at logical-construct construction etc . This knowledge make two things clear:

1. Using proven frameworks or libraries (like Zend, CodeIgniter, PHPCake etc) will save you a lot of time and you will end up with more robust applications since the framework’s codebase will be cleaner than a from scratch solution you create.

2. Testing should be significant part of the regime – test and retest, I like to say. I would even suggest a testing protocol be put in place (unit testing on the object level can make sense) where with each update to the codebase, a series of related test of the application is initiated.

How Simple Errors Can Cause Big Problems

We’ve recently been updating the shopping cart system on killervideostore.com and I found errors creeping into the application that prevented some buyers from actually buying product this is a problem for a store!

:(

The funny thing is, that the problem was a simple UI bug (simple CSS fix for IE) that pushed buttons out of view and so the buying process was made impossible. A simple retest of the UI on all the major browser before publishing would have been a good idea IMHO.

That’s the funny thing about bugs, they show up where YOU DON’T EXPECT THEM.

Stefan