Those computer things are the devils work


As I've written before, the company I worked for previously was a bizarre outfit run by people who thought that software development was a dirty thing, and they really weren't keen on upgrading past MS Access 97. In fact, the code base for their core application still uses DAO almost exclusively, rather than ADO (which make it impossible to upgrade to 64 bit Access without a major re-write), and most of the business logic is based in the forms, as class modules are too hard to understand, according to the head developer.

I found a piece of code once, in their main application - written by the 'head developer', which was an almost perfect example of programming ignorance and negligence. Basically, the programmer needed to validate an address, and part of his routine checked that the first digit of the address was numeric. Not sure what was supposed to happen if the address had a house name instead. Anyhoo,  rather than use the built in VBA 'isnumeric' function,he decided to use his own.  Now, this function he wrote basically took the very first character of the string, and checked it thus :

Is is a Zero? Yes - Return True. No - Keep Going

Is is a 1? Yes - Return True. No - Keep Going

Is is a 2? Yes - Return True. No - Keep Going

Is is a 3? Yes - Return True. No - Keep Going

Is is a 4? Yes - Return True. No - Keep Going .....   You get the message.

I kid you not - this address validator actually returned 'true' if the first character of the address was zero!    Not only that, but can you imagine a clunkier, more inefficient way to write code?


Saying that, this 'head programmer' had to ask for the Technical Directors' help when he got stuck trying to implement some nested 'if then' statements. To make matters worse, the Technical Director helped him through the use of various 'Gosub' tags. (No this wasn't in 1983 - it was 2009). To my chagrin, I spent 9 years at that company, before becoming self employed. Never again do I have to listen to Ludites and morons wittle on about 'how no on wants to use internet based programs'.

Comments

Popular Posts