[IRL] Still Rofflemowing

Not many posts, sorry! Busy at work. I know I keep saying that and mentioning that it is refreshing to be busy but it’s true.

One of the things I’m doing at work is improving on the existing automation framework which is like a Frankenstein monster only put together by a lot of different Dr. Frankensteins with varying degrees of expertise. The overall premise of the system is brilliant and the implementation was sufficient, however, over time it grew to be a little unmanageable and inflexible. I’m changing that without breaking anything and to do that, I’ve got to dig into a lot of the code which is mostly logical steps in build files (Visual Build Pro – great tool!) and VBScript.

I stumbled across a real gem of VBScript which had me chuckling. Now not all code is like this, this is just a little LOL I stumbled across. Here it is (removing anything that could be considered sensitive):

if Verison = “9” or Version = “9.0” then
Version = “9”
end if

if Version =”9″ or Version = “9.0” then

True story.

This is a prime example of someone that was either in a rush, copy/pasted, really had no idea what they were doing, was interrupted mid thought or all of the above. And yes, that first misspelling of “Verison” was intentional – that’s really how it was. The point of the first ‘if’ statement was to strip the “.0” from the Version value so yeah… checking if it is “9” already was bad. Typo was bad too. Worse still was the check further down that had no faith in the fact that the previous code executed to change Version to “9”.

Fun times!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s