Software Development – Testing Modern Software

In the olden days programming languages were pretty straightforward. COBOL, fourth generation languages, even say, Visual Basic, didn’t have a lot of commands, and the ones they had were pretty simple.

New languages, which are no doubt much more powerful, are way more complicated. They are also way, way more convoluted. I remember a presentation given by a Lotus Notes developer who argued that using a high level language the best  path to  get  business  done, in  contrast  to  using  something like JAVA, which required a developer to be “a propeller-head  (i.e. computer nerd) to the nth degree”.

Modern languages can produce unexpected errors. For example, recently I was developing a WordPress Plugin, using PHP and WordPress. Normally, when a PHP programmer wants to write something to the browser he inserts a line something like echo “write this to the browser”.  Pretty straightforward.

However, in this case I wanted to write stuff to the browser within a WordPress function that was invoked by a “shortcode”.  In that case, you can’t just use echo “write this to a browser”. The WordPress documentation does warn against this, but it’s about three-quarters of the way down the page in the Notes: “Note that the function called by the shortcode should never produce output of any kind.”

I hadn’t read all that, and as a result my code had a pretty hard-to-find error embedded within it. Luckily, I happened to catch it and all is well (I hope).

This isn’t a knock on WordPress at all. The point is that modern languages are complicated, obtuse, and often require a “propeller head of the nth  degree” to use. It’s impossible to just eyeball this stuff and catch all the errors. Code that will “obviously” work might not. Detailed testing is required even for the simplest code.

Leave a Reply

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